IX509ExtensionTemplate interface

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.

Members

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

Methods

The IX509ExtensionTemplate interface has these methods.

MethodDescription
InitializeDecode

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

InitializeEncode

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

[WebEnabled]

 

Properties

The IX509ExtensionTemplate interface has these properties.

PropertyAccess typeDescription

MajorVersion

Read-only

Retrieves the minimum major version number of the certificate template.

MinorVersion

Read-only

Retrieves the minimum minor version number of the certificate template.

TemplateOid

Read-only

Retrieves the template OID.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

CertEnroll Interfaces
IX509Extension

 

 

Community Additions

ADD
Show:
© 2014 Microsoft