IX509AttributeExtensions interface

The IX509AttributeExtensions interface defines methods and properties that initialize and retrieve certificate extensions in a certificate request. For example, the CertificateRequestInfo structure of a PKCS #10 request does not contain a field for version 3 extensions. Instead, the extensions must be added to the attributes collection in the request.

CertificationRequestInfo ::= SEQUENCE 
   version       INTEGER { v1(0) } (v1,...),
   subject       Name,
   subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
   attributes    [0] Attributes{{ CRIAttributes }}
Also, extensions are included in a CMC request by adding them to the TaggedAttributes structure shown in the following Abstract Syntax Notation One (ASN.1) syntax example. For more information, see Attributes and Extensions.

CmcData ::= SEQUENCE 
   controlSequence         ControlSequence,
   reqSequence             ReqSequence,
   cmsSequence             CmsSequence,
   otherMsgSequence        OtherMsgSequence

ControlSequence  ::=    SEQUENCE OF TaggedAttribute

TaggedAttribute ::= SEQUENCE 
   bodyPartID              BodyPartID,
   type                    EncodedObjectID,
   values                  AttributeSetValue

BodyPartID ::= INTEGER (0..4294967295)
AttributeSetValue ::= SET OF ANY
You can create one or more version 3 extensions and include them in a certificate request in the following manner:


The IX509AttributeExtensions interface has these methods.

Method Description
IX509AttributeExtensions::get_X509Extensions Retrieves the certificate extensions.
IX509AttributeExtensions::InitializeDecode Initializes the object from a Distinguished Encoding Rules (DER) encoded byte array that contains the attribute value.
IX509AttributeExtensions::InitializeEncode Initializes the object from an IX509Extensions collection.


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