IAlternativeName interface (certenroll.h)

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.

Value Description Initialization method
XCN_CERT_ALT_NAME_OTHER_NAME The name consists of an object identifier (OID) and a byte array. InitializeFromOtherName
XCN_CERT_ALT_NAME_RFC822_NAME The name is an email address. InitializeFromString
XCN_CERT_ALT_NAME_DNS_NAME The name is a Domain Name System (DNS) name. InitializeFromString
XCN_CERT_ALT_NAME_DIRECTORY_NAME The name is an X.500 directory name. InitializeFromRawData
XCN_CERT_ALT_NAME_URL The name is a URL. InitializeFromString
XCN_CERT_ALT_NAME_IP_ADDRESS The name is an Internet Protocol (IP) address. InitializeFromRawData
XCN_CERT_ALT_NAME_REGISTERED_ID The name is a registered OID. InitializeFromString
XCN_CERT_ALT_NAME_GUID The name is a GUID. InitializeFromRawData
XCN_CERT_ALT_NAME_USER_PRINCIPLE_NAME The name is a user principal name (UPN). InitializeFromString

Inheritance

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

Methods

The IAlternativeName interface has these methods.

 
IAlternativeName::get_ObjectId

Retrieves the object identifier (OID), if any, associated with the name.
IAlternativeName::get_RawData

Retrieves the Distinguished Encoding Rules (DER) encoded byte array that contains the name.
IAlternativeName::get_StrValue

Retrieves a string that contains an email address, a Domain Name System (DNS) name, a URL, a registered object identifier (OID), or a user principal name (UPN).
IAlternativeName::get_Type

Retrieves the alternative name type.
IAlternativeName::InitializeFromOtherName

Initializes the object from an object identifier (OID) and the associated raw data (byte array).
IAlternativeName::InitializeFromRawData

Initializes the object from a Digital Signature Algorithm (DSA) GUID, an X.500 directory name, or an Internet Protocol (IP) address contained in a Distinguished Encoding Rules (DER) encoded byte array.
IAlternativeName::InitializeFromString

Initializes the object from a string that contains an email address, a Domain Name System (DNS) name, a URL, a registered object identifier (OID), or a user principal name (UPN).

Requirements

   
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

IAlternativeNames

IDispatch

IX509ExtensionAlternativeNames