IAlternativeName interface
Applies to: desktop apps only
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 |
Members
The IAlternativeName interface inherits from the IDispatch interface. IAlternativeName also has these types of members:
Methods
The IAlternativeName interface has these methods.
| Method | Description |
|---|---|
| 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.
| Property | Description |
|---|---|
|
Retrieves the OID, if any, associated with the name. | |
|
Retrieves the DER-encoded byte array that contains the name. | |
|
Retrieves a string that contains an email address, a DNS name, a URL, a registered OID, or a UPN. | |
|
Retrieves the alternative name type. |
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Header |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012