IX509NameValuePair interface (certenroll.h)

The IX509NameValuePair interface represents a generic name-value pair. Although there are a few common name-value pairs created by the certificate request and enrollment process, you can use this object to specify any name and value. An IX509NameValuePairs collection can be retrieved from an IX509Enrollment object and an IX509CertificateRequestCmc object. The collections are not related.

name-value pairs and the enrollment object:
Before an IX509Enrollment object submits a certificate request to a certification authority (CA), the name-value collection is encoded as a concatenated attribute string that has the format Name1:Value1\Name2:Value2\. You can retrieve the collection by calling the NameValuePairs property. You can use the IX509NameValuePairs object to add name-value pairs to the collection.
name-value pairs and the CMC request object:
A CMC request object (IX509CertificateRequestCmc) contains sequences of TaggedAttribute, TaggedRequest, and TaggedContentInfo ASN.1 structures. For more information, see CMC Attributes

The TaggedAttribute structure can contain a RegInfo attribute. This attribute consists of a byte array that contains the name-value pair collection. The byte array is created in the following manner:

  • Each name-value string is standardized. For example, "%5C" escapes are substituted for backslash (\\) characters.
  • Each name-value pair is concatenated by using an equal sign (=).
  • All of the pairs are concatenated by using an ampersand (&)between each pair.
  • The result is encoded as a UTF-8 string.

The following example shows the ASN.1 output for a CMC certificate that contains a RegInfo attribute that contains a single name-value pair of "RequesterName=Domain\TargetUser".


...
30 33              ; SEQUENCE (33 Bytes)
   02 01                            ; INTEGER (1 Bytes)
   |  02
   06 08                            ; OBJECT_ID (8 Bytes)
   |  2b 06 01 05 05 07 07 12
   |     ; 1.3.6.1.5.5.7.7.18 Reg Info
   31 24                ; SET (24 Bytes)
      04 22 ; OCTET_STRING (22 Bytes)
      52 65 71 75 65 73 74 65  72 4e 61 6d 65 3d 44 6f  ; RequesterName=Do
      6d 61 69 6e 25 35 43 54  61 72 67 65 74 55 73 65  ; main%5CTargetUse
      72 26                                             ; r& 
...

Inheritance

The IX509NameValuePair interface inherits from the IDispatch interface. IX509NameValuePair also has these types of members:

Methods

The IX509NameValuePair interface has these methods.

 
IX509NameValuePair::get_Name

Retrieves the name portion of the name-value pair.
IX509NameValuePair::get_Value

Retrieves the value portion of the name-value pair.
IX509NameValuePair::Initialize

Initializes the object from strings that contain the name and associated value.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h

See also

CertEnroll Interfaces

IDispatch

IX509NameValuePairs