IX509ExtensionTemplateName interface (certenroll.h)

The IX509ExtensionTemplateName interface defines methods and properties that can be used to initialize or retrieve a template name 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. The template is identified by name.

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

 

The extension is encoded as a name-value pair where name equals the Unicode string "CertificateTemplate" and the associated value is the name of the template. The following syntax shows an example of the Abstract Syntax Notation One (ASN.1) output for the template named "User". The extension value is encoded by using Distinguished Encoding Rules (DER).


30 42				; SEQUENCE (42 Bytes)
|  06 0a				; OBJECT_ID (a Bytes)
|  |  2b 06 01 04 01 82 37 0d  02 01
|  |     ; 1.3.6.1.4.1.311.13.2.1 Enrollment Name Value Pair
|  31 34				; SET (34 Bytes)
|     30 32			; SEQUENCE (32 Bytes)
|        1e 26			; UNICODE_STRING (26 Bytes)
|        |  00 43 00 65 00 72 00 74  00 69 00 66 00 69 00 63  ; .C.e.r.t.i.f.i.c
|        |  00 61 00 74 00 65 00 54  00 65 00 6d 00 70 00 6c  ; .a.t.e.T.e.m.p.l
|        |  00 61 00 74 00 65                                 ; .a.t.e
|        |     ; "CertificateTemplate"
|        1e 08			; UNICODE_STRING (8 Bytes)
|           00 55 00 73 00 65 00 72                           ; .U.s.e.r
|              ; "User"

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 IX509ExtensionTemplateName interface inherits from IX509Extension. IX509ExtensionTemplateName also has these types of members:

Methods

The IX509ExtensionTemplateName interface has these methods.

 
IX509ExtensionTemplateName::get_TemplateName

Retrieves the name of the template.
IX509ExtensionTemplateName::InitializeDecode

Initializes the extension from a Distinguished Encoding Rules (DER) encoded byte array that contains the extension value. (IX509ExtensionTemplateName.InitializeDecode)
IX509ExtensionTemplateName::InitializeEncode

Initializes the extension from a string that contains the template name.

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

IX509Extension