ICertEncodeAltName interface (certenc.h)

The ICertEncodeAltName interface provides methods for handling alternate names used in certificate extensions.

A certificate extension can be created using an alternate name array stored in an extension handler COM object. Each element in the array is a structure that contains a name string and a name choice.

This interface is useful for encoding and decoding szOID_SUBJECT_ALT_NAME2 "2.5.29.17" extensions; the SDK sample policy module uses this interface.

ICertEncodeAltName is defined in Certenc.h. When you create your program, however, use Certsrv.h as the include file. Certenc.dll provides the ICertEncodeAltName interface. The type information for this interface is also in Certencl.dll, which is shipped with the Platform Software Development Kit (SDK).

Certificate Services interfaces support both apartment-threading and free-threading models. For better throughput, free threading is recommended.

Inheritance

The ICertEncodeAltName interface inherits from the IDispatch interface. ICertEncodeAltName also has these types of members:

Methods

The ICertEncodeAltName interface has these methods.

 
ICertEncodeAltName::Decode

Decodes an Abstract Syntax Notation One (ASN.1)-encoded alternate name extension and stores the resulting array of strings in the CertEncodeAltName object.
ICertEncodeAltName::Encode

Returns an ASN.1-encoded string of the alternate name array stored in this object. The names in the object are not encoded.
ICertEncodeAltName::GetName

Returns the specified name from the alternate name array.
ICertEncodeAltName::GetNameChoice

Returns the name choice at a specified index of an alternate name array.
ICertEncodeAltName::GetNameCount

Returns the number of names in the alternate name array.
ICertEncodeAltName::Reset

Specifies the size of the alternate name array in this object. The value of all elements in the array are set to zero.
ICertEncodeAltName::SetNameEntry

Sets a name at a specified index of the alternate name array.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header certenc.h (include Certsrv.h)