IAlternativeName interface

A collection of IAlternativeName interfaces is used by an IX509ExtensionAlternativeNames object to represent an instance of an AlternativeNames extension. The collection is represented by the IAlternativeNames interface. The following syntax shows the Abstract Syntax Notation One (ASN.1) structure of the extension.


----------------------------------------------------------------------
-- AlternativeNames 
-- XCN_OID_SUBJECT_ALT_NAME2 (2.5.29.17)
----------------------------------------------------------------------

AltNames ::= SEQUENCE --#public-- OF GeneralName
GeneralNames ::= AltNames

GeneralName ::= CHOICE 
{
  otherName              [0] IMPLICIT OtherName,
  rfc822Name             [1] IMPLICIT IA5STRING,
  dNSName                [2] IMPLICIT IA5STRING,
  x400Address            [3] IMPLICIT SeqOfAny,       --Not supported
  directoryName          [4] EXPLICIT ANY,    
  ediPartyName           [5] IMPLICIT SeqOfAny,
  uniformResourceLocator [6] IMPLICIT IA5STRING,
  iPAddress              [7] IMPLICIT OCTETSTRING,
  registeredID           [8] IMPLICIT EncodedObjectID --Not supported
}

OtherName ::= SEQUENCE 
{
   type                    EncodedObjectID,
   value                   [0] EXPLICIT NOCOPYANY 
}

You can initialize an IAlternativeName object from an AlternativeNameType enumeration. The following types are available, but they are supported by different initialization methods as indicated.

ValueDescriptionInitialization method
XCN_CERT_ALT_NAME_OTHER_NAMEThe name consists of an object identifier (OID) and a byte array. InitializeFromOtherName
XCN_CERT_ALT_NAME_RFC822_NAMEThe name is an email address. InitializeFromString
XCN_CERT_ALT_NAME_DNS_NAMEThe name is a Domain Name System (DNS) name. InitializeFromString
XCN_CERT_ALT_NAME_DIRECTORY_NAMEThe name is an X.500 directory name. InitializeFromRawData
XCN_CERT_ALT_NAME_URLThe name is a URL. InitializeFromString
XCN_CERT_ALT_NAME_IP_ADDRESSThe name is an Internet Protocol (IP) address. InitializeFromRawData
XCN_CERT_ALT_NAME_REGISTERED_IDThe name is a registered OID. InitializeFromString
XCN_CERT_ALT_NAME_GUIDThe name is a GUID. InitializeFromRawData
XCN_CERT_ALT_NAME_USER_PRINCIPLE_NAMEThe name is a user principal name (UPN). InitializeFromString

 

Members

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

Methods

The IAlternativeName interface has these methods.

MethodDescription
InitializeFromOtherName

Initializes the object from an OID and the associated raw data (byte array).

InitializeFromRawData

Initializes the object from a DSA GUID, an X.500 directory name, or an IP address contained in a Distinguished Encoding Rules (DER) encoded byte array.

InitializeFromString

Initializes the object from a string that contains an email address, a DNS name, a URL, a registered OID, or a UPN.

 

Properties

The IAlternativeName interface has these properties.

PropertyDescription

ObjectId

Retrieves the OID, if any, associated with the name.

RawData

Retrieves the DER-encoded byte array that contains the name.

StrValue

Retrieves a string that contains an email address, a DNS name, a URL, a registered OID, or a UPN.

Type

Retrieves the alternative name type.

 

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
IAlternativeNames
IX509ExtensionAlternativeNames

 

 

Community Additions

ADD
Show:
© 2014 Microsoft