IX509ExtensionTemplate interface (certenroll.h)

The IX509ExtensionTemplate interface defines methods and properties that can be used to initialize or retrieve a CertificateTemplate extension. This extension can be placed in the certificate request to tell the certification authority what template to use when issuing or renewing a certificate.

Note  The CertificateTemplate extension is used to identify version 2 templates. To identify a version 1 template, you can use the CertificateTemplateName extension defined by the IX509ExtensionTemplateName interface.

 
The following syntax shows the Abstract Syntax Notation One (ASN.1) structure of the extension. The extension value is encoded by using Distinguished Encoding Rules (DER) and included in the certificate request.

----------------------------------------------------------------------
-- CertificateTemplate
-- XCN_OID_CERTIFICATE_TEMPLATE (1.3.6.1.4.1.311.21.7)
----------------------------------------------------------------------

CertificateTemplate ::= SEQUENCE { templateID EncodedObjectID, templateMajorVersion TemplateVersion, templateMinorVersion TemplateVersion OPTIONAL }

TemplateVersion ::= INTEGER (0..4294967295)

To add this extension object to a PKCS #10 request or a CMC request, you must first add it to an IX509Extensions collection and use the collection to initialize an IX509AttributeExtensions object. For more information, see the PKCS #10 Extensions and the CMC Extensions topics.

Inheritance

The IX509ExtensionTemplate interface inherits from IX509Extension. IX509ExtensionTemplate also has these types of members:

Methods

The IX509ExtensionTemplate interface has these methods.

 
IX509ExtensionTemplate::get_MajorVersion

Retrieves the minimum major version number of the certificate template.
IX509ExtensionTemplate::get_MinorVersion

Retrieves the minimum minor version number of the certificate template.
IX509ExtensionTemplate::get_TemplateOid

Retrieves the template object identifier (OID).
IX509ExtensionTemplate::InitializeDecode

Initializes the extension from a DER-encoded byte array that contains the extension value.
IX509ExtensionTemplate::InitializeEncode

Initializes the extension from a template object identifier (OID) and from major and minor version numbers.

Requirements

   
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

IX509Extension