CMC Request

The following example contains a CMC certificate request. The example was generated by using the Certreq.exe and Certutil.exe tools. The .inf file used as input to Certreq.exe contains the following configuration.

[NewRequest]
Subject="cn=TestCN,o=TestOrg"
RequestType=cmc

[RequestAttributes]
CertificateTemplate=User

This configuration generates the following sample output. The configuration specifies the subject, type of request (CMC), and certificate template (User). The User template specifies that:

  • The request must use either the Microsoft Base Cryptographic Provider 1.0 or the Microsoft Enhanced Cryptographic Provider 1.0.
  • The subject name must be built from Active Directory.
  • The request includes the Certificate Template Name, Enhanced Key Usage (EKU), and Key Usage extensions. The EKU extension specifies that the issued certificate can be used for Encrypting File System (EFS), secure email, and client authentication.

A CMC certificate request is represented by the IX509CertificateRequestCmc interface.

PKCS7/CMS Message:
  CMSG_SIGNED(2)
  CMSG_SIGNED_DATA_CMS_VERSION(3)
  Content Type: 1.3.6.1.5.5.7.12.2 CMC Data

PKCS7 Message Content:
================ Begin Nesting Level 1 ================
CMS Certificate Request:
Tagged Attributes: 1

  Body Part Id: 2
  1.3.6.1.4.1.311.10.10.1 CMC Attributes
  Value[0]:
    Data Reference: 0
    Cert Reference[0]: 1
  1 attributes:

  Attribute[0]: 1.3.6.1.4.1.311.21.20 (Client Information)
    Value[0][0]:
    Unknown Attribute type
    Client Id: = 9
      (XECI_DISABLE -- 0)
      (XECI_XENROLL -- 1)
      (XECI_AUTOENROLL -- 2)
      (XECI_REQWIZARD -- 3)
      (XECI_CERTREQ -- 4)
    User: JDOMCSC\administrator
    Machine: vich3d.jdomcsc.nttest.microsoft.com
    Process: certreq
    0000  30 48 02 01 09 0c 23 76  69 63 68 33 64 2e 6a 64   0H....#vich3d.jd
    0010  6f 6d 63 73 63 2e 6e 74  74 65 73 74 2e 6d 69 63   omcsc.nttest.mic
    0020  72 6f 73 6f 66 74 2e 63  6f 6d 0c 15 4a 44 4f 4d   rosoft.com..JDOM
    0030  43 53 43 5c 61 64 6d 69  6e 69 73 74 72 61 74 6f   CSC\administrato
    0040  72 0c 07 63 65 72 74 72  65 71                     r..certreq


Tagged Requests: 1
  CMC_TAGGED_CERT_REQUEST_CHOICE:
  Body Part Id: 1
================ Begin Nesting Level 2 ================
Element 0:
PKCS10 Certificate Request:
Version: 1
Subject:
    O=TestOrg
    CN=TestCN
    [0,0]: CERT_RDN_PRINTABLE_STRING, Length = 6 (6/64 Characters)
        2.5.4.3 Common Name (CN)="TestCN"

        54 65 73 74 43 4e                                  TestCN

        54 00 65 00 73 00 74 00  43 00 4e 00               T.e.s.t.C.N.

    [1,0]: CERT_RDN_PRINTABLE_STRING, Length = 7 (7/64 Characters)
        2.5.4.10 Organization (O)="TestOrg"

        54 65 73 74 4f 72 67                               TestOrg

        54 00 65 00 73 00 74 00  4f 00 72 00 67 00         T.e.s.t.O.r.g.


Public Key Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.1 RSA (RSA_SIGN)
    Algorithm Parameters:
    05 00
Public Key Length: 1024 bits
Public Key: UnusedBits = 0
    0000  30 81 89 02 81 81 00 af  5e 54 53 58 0d 96 c6 b3
    0010  c0 77 3f 3d 6a 01 8a b6  e8 1f 12 ed da b3 f2 3f
    0020  f3 f0 31 99 61 a1 25 bb  bf 3b d0 aa ae d5 0f ac
    0030  12 a4 30 1f 92 83 e9 bd  6f c8 47 6f 57 8e 91 23
    0040  ac fa 14 ad 42 b7 f9 b1  ab e1 2a 92 7d 76 7a 97
    0050  49 95 83 eb c1 07 89 56  a9 16 96 03 1c e4 01 34
    0060  ff f0 94 8a 83 f9 68 70  92 d1 59 bf 15 70 0f e8
    0070  fd 4b eb 5c e7 9e 1d 4c  e6 73 99 12 7e 52 91 92
    0080  9b 2e d3 2b 0d 89 65 02  03 01 00 01
Request Attributes: 5
  5 attributes:

  Attribute[0]: 1.3.6.1.4.1.311.13.2.3 (OS Version)
    Value[0][0]:
        6.0.5361.2
    0000  16 0a 36 2e 30 2e 35 33  36 31 2e 32               ..6.0.5361.2

  Attribute[1]: 1.3.6.1.4.1.311.13.2.1 (Enrollment Name Value Pair)
    Value[1][0]:
        CertificateTemplate=User
    0000  30 32 1e 26 00 43 00 65  00 72 00 74 00 69 00 66   02.&.C.e.r.t.i.f
    0010  00 69 00 63 00 61 00 74  00 65 00 54 00 65 00 6d   .i.c.a.t.e.T.e.m
    0020  00 70 00 6c 00 61 00 74  00 65 1e 08 00 55 00 73   .p.l.a.t.e...U.s
    0030  00 65 00 72                                        .e.r

  Attribute[2]: 1.3.6.1.4.1.311.21.20 (Client Information)
    Value[2][0]:
    Unknown Attribute type
    Client Id: = 9
      (XECI_DISABLE -- 0)
      (XECI_XENROLL -- 1)
      (XECI_AUTOENROLL -- 2)
      (XECI_REQWIZARD -- 3)
      (XECI_CERTREQ -- 4)
    User: JDOMCSC\administrator
    Machine: vich3d.jdomcsc.nttest.microsoft.com
    Process: certreq
    0000  30 48 02 01 09 0c 23 76  69 63 68 33 64 2e 6a 64   0H....#vich3d.jd
    0010  6f 6d 63 73 63 2e 6e 74  74 65 73 74 2e 6d 69 63   omcsc.nttest.mic
    0020  72 6f 73 6f 66 74 2e 63  6f 6d 0c 15 4a 44 4f 4d   rosoft.com..JDOM
    0030  43 53 43 5c 61 64 6d 69  6e 69 73 74 72 61 74 6f   CSC\administrato
    0040  72 0c 07 63 65 72 74 72  65 71                     r..certreq

  Attribute[3]: 1.3.6.1.4.1.311.13.2.2 (Enrollment CSP)
    Value[3][0]:
    Unknown Attribute type
    CSP Provider Info
    KeySpec = 1
    Provider = Microsoft Enhanced Cryptographic Provider v1.0
    Signature: UnusedBits=0
    0000  30 64 02 01 01 1e 5c 00  4d 00 69 00 63 00 72 00   0d....\.M.i.c.r.
    0010  6f 00 73 00 6f 00 66 00  74 00 20 00 45 00 6e 00   o.s.o.f.t. .E.n.
    0020  68 00 61 00 6e 00 63 00  65 00 64 00 20 00 43 00   h.a.n.c.e.d. .C.
    0030  72 00 79 00 70 00 74 00  6f 00 67 00 72 00 61 00   r.y.p.t.o.g.r.a.
    0040  70 00 68 00 69 00 63 00  20 00 50 00 72 00 6f 00   p.h.i.c. .P.r.o.
    0050  76 00 69 00 64 00 65 00  72 00 20 00 76 00 31 00   v.i.d.e.r. .v.1.
    0060  2e 00 30 03 01 00                                  ..0...

  Attribute[4]: 1.2.840.113549.1.9.14 (Certificate Extensions)
    Value[4][0]:
    Unknown Attribute type
Certificate Extensions: 4
    1.3.6.1.4.1.311.20.2: Flags = 0, Length = a
    Certificate Template Name (Certificate Type)
        User

    0000  1e 08 00 55 00 73 00 65  00 72                     ...U.s.e.r

    2.5.29.37: Flags = 0, Length = 22
    Enhanced Key Usage
        Encrypting File System (1.3.6.1.4.1.311.10.3.4)
        Secure Email (1.3.6.1.5.5.7.3.4)
        Client Authentication (1.3.6.1.5.5.7.3.2)

    0000  30 20 06 0a 2b 06 01 04  01 82 37 0a 03 04 06 08   0 ..+.....7.....
    0010  2b 06 01 05 05 07 03 04  06 08 2b 06 01 05 05 07   +.........+.....
    0020  03 02                                              ..

    2.5.29.15: Flags = 1(Critical), Length = 4
    Key Usage
        Digital Signature, Key Encipherment (a0)

    0000  03 02 05 a0                                        ....

    2.5.29.14: Flags = 0, Length = 16
    Subject Key Identifier
        36 91 78 7a 2f 0b b7 ef af 06 e2 9c 3c cb 06 51 d8 9d 70 57

    0000  04 14 36 91 78 7a 2f 0b  b7 ef af 06 e2 9c 3c cb   ..6.xz/.......<.
    0010  06 51 d8 9d 70 57                                  .Q..pW

    0000  30 73 30 17 06 09 2b 06  01 04 01 82 37 14 02 04   0s0...+.....7...
    0010  0a 1e 08 00 55 00 73 00  65 00 72 30 29 06 03 55   ....U.s.e.r0)..U
    0020  1d 25 04 22 30 20 06 0a  2b 06 01 04 01 82 37 0a   .%."0 ..+.....7.
    0030  03 04 06 08 2b 06 01 05  05 07 03 04 06 08 2b 06   ....+.........+.
    0040  01 05 05 07 03 02 30 0e  06 03 55 1d 0f 01 01 ff   ......0...U.....
    0050  04 04 03 02 05 a0 30 1d  06 03 55 1d 0e 04 16 04   ......0...U.....
    0060  14 36 91 78 7a 2f 0b b7  ef af 06 e2 9c 3c cb 06   .6.xz/.......<..
    0070  51 d8 9d 70 57                                     Q..pW
Signature Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.5 sha1RSA
    Algorithm Parameters:
    05 00
Signature: UnusedBits=0
    0000  62 27 88 c7 5b b4 84 2a  60 88 4a 39 2b e1 64 46
    0010  f3 dc 1c 3a be 56 b9 0e  a7 39 83 d6 1f 88 39 7e
    0020  54 26 7e cf 4b 5f b2 16  25 5c 08 81 ef 7a 9e 9c
    0030  29 d2 0e 74 8d 60 34 d7  1b f9 ac ce 55 2a e0 9a
    0040  8c 08 bd 34 01 bc 8b 70  91 6f f8 eb bb de 8a 2d
    0050  b4 c6 66 d3 7c 86 d5 6c  0f 6e 22 95 ae 09 a8 2d
    0060  91 45 12 56 4d 8c e1 0a  a8 42 15 29 fe ed 15 8a
    0070  bc b9 ba 05 b3 e5 7f c3  ea c0 df 76 99 1b b7 a8
Signature matches Public Key
Key Id Hash(rfc-sha1): 36 91 78 7a 2f 0b b7 ef af 06 e2 9c 3c cb 06 51 d8 9d 70 57
Key Id Hash(sha1): 13 e5 cb f4 54 75 e5 e0 62 6e 20 f6 d3 d7 b0 51 9d 0e 0d 35
----------------  End Nesting Level 2  ----------------

Tagged Content Info: 0
Tagged Other Messages: 0
----------------  End Nesting Level 1  ----------------

Signer Count: 1

Signer Info[0]:
Signature matches request Public Key
CMSG_SIGNER_INFO_CMS_VERSION(3)
CERT_ID_KEY_IDENTIFIER(2)
    0000  36 91 78 7a 2f 0b b7 ef  af 06 e2 9c 3c cb 06 51
    0010  d8 9d 70 57
Hash Algorithm:
    Algorithm ObjectId: 1.3.14.3.2.26 sha1 (sha1NoSign)
    Algorithm Parameters: NULL
Encrypted Hash Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.1 RSA (RSA_SIGN)
    Algorithm Parameters: NULL
Encrypted Hash:
    0000  38 10 60 e2 70 69 91 4a  8b b5 22 57 2a 62 ef de
    0010  15 7d 59 d6 4e 20 9a 45  2b e3 fd fc 68 ba af bf
    0020  9c 17 b0 8e 6d c4 29 1e  e3 21 ac bb 5a 8a c9 67
    0030  0a d4 45 93 10 c0 26 eb  0a 83 c2 b1 40 87 36 f7
    0040  a0 26 da b9 bb 46 73 88  7a 67 b9 e6 b3 6f ea 59
    0050  28 8a d3 92 72 f6 7b 89  a0 d8 2d 9e 40 eb 1e bb
    0060  6e ae f0 5a ed 16 c9 e3  27 59 37 8f f3 4a 98 60
    0070  f8 fb a7 0a ee 1b 6e 91  95 96 cf 0d 56 ac ab 35

Authenticated Attributes[0]:
  2 attributes:

  Attribute[0]: 1.2.840.113549.1.9.3 (Content Type)
    Value[0][0]:
    Unknown Attribute type
    1.3.6.1.5.5.7.12.2 CMC Data
    0000  06 08 2b 06 01 05 05 07  0c 02                     ..+.......

  Attribute[1]: 1.2.840.113549.1.9.4 (Message Digest)
    Value[1][0]:
    Unknown Attribute type
    Message Digest(certutil):
        d1 5d 41 ed 30 cb ca d1 24 0a 57 00 ea 6b 47 a2 f8 79 cd 9b
    0000  04 14 d1 5d 41 ed 30 cb  ca d1 24 0a 57 00 ea 6b   ...]A.0...$.W..k
    0010  47 a2 f8 79 cd 9b                                  G..y..

Unauthenticated Attributes[0]:
  0 attributes:

Computed Hash: 51 47 46 b5 98 2e bc bc 79 43 aa 59 05 1b 77 8d 65 2c be 59
No Recipient

No Certificates
No CRLs
CertUtil: -dump command completed successfully.

Sample Requests