Export (0) Print
Expand All

Template object

[The Template object is available for use in the operating systems specified in the Requirements section. Instead, use the X509Extension Class in the System.Security.Cryptography.X509Certificates namespace by calling the constructor that takes an OID as a parameter, and then use the OID for Certificate Template to retrieve the certificate extension template.]

The Template object represents the certificate extension template of the certificate.

When to use

The Template object is used to perform the following tasks:

  • Determine whether the template is marked critical or present.
  • Retrieve the object identifier (OID) or name of the template.
  • Retrieve the minor or major version of the template.

Members

The Template object has these types of members:

Properties

The Template object has these properties.

PropertyAccess typeDescription

IsCritical

Read-only

Retrieves a Boolean value that indicates whether the template extension is marked critical.

IsPresent

Read-only

Retrieves a Boolean value that indicates whether the template extension is present.

MajorVersion

Read-only

Retrieves the major version number of the template.

MinorVersion

Read-only

Retrieves the minor version number of the template.

Name

Read-only

Retrieves a string that contains the name of the template.

OID

Read-only

Retrieves an OID object that identifies the Template object.

 

Remarks

The Template object cannot be created.

A Template object is returned by the Certificate.Template method.

CAPICOM uses two different versions of certificate templates. The following table shows the name and OID for each certificate template version.

VersionNameOID
V1szOID_ENROLL_CERTTYPE_EXTENSION"1.3.6.1.4.1.311.20.2"
V2szOID_CERTIFICATE_TEMPLATE"1.3.6.1.4.1.311.21.7"

 

Requirements

Redistributable

CAPICOM 2.0 or later on Windows Server 2003 and Windows XP

DLL

Capicom.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft