Creating a Subject Name

You can use the IX500DistinguishedName interface to create a subject name from a distinguished name string. The string consists of concatenated relative distinguished names (RDNs). The following RDN keys are supported by the Certificate Enrollment API.

Key OID Description
C
XCN_OID_COUNTRY_NAME
Contains a two-letter ISO 3166 country or region code.
CN
XCN_OID_COMMON_NAME
Contains a common name.
E
EMAIL
XCN_OID_RSA_emailAddr
Contains an email address.
DC
XCN_OID_DOMAIN_COMPONENT
Contains one part of a Domain Name System (DNS) name.
G
GivenName
XCN_OID_GIVEN_NAME
Contains the part of a person's name that is not a surname.
I
XCN_OID_INITIALS
Contains a person's initials.
L
XCN_OID_LOCALITY_NAME
Contains the locality name that identifies a city, country, or other geographic region.
O
XCN_OID_ORGANIZATION_NAME
Contains the name of an organization.
OU
XCN_OID_ORGANIZATIONAL_UNIT_NAME
Contains the name of a unit subdivision within an organization.
S
ST
XCN_OID_STATE_OR_PROVINCE_NAME
Contains the full name of a state or province.
STREET
XCN_OID_STREET_ADDRESS
Contains the physical address.
SN
XCN_OID_SUR_NAME
Contains the family name of a person.
T
TITLE
XCN_OID_TITLE
Contains the title of a person in the organization.

When you initialize an IX500DistinguishedName object, you can identify the format of the distinguished name by specifying a value from the X500NameFlags enumeration type. For example, assume that the subject distinguished name consists of the following RDNs:

CN=Administrator
CN=Users
DC=jdomcsc
DC=nttest
DC=microsoft
DC=com

If you concatenate these RDNs into the following comma-delimited distinguished name string, you can specify the XCN_CERT_NAME_STR_COMMA_FLAG value when initializing an IX500DistinguishedName object.

CN=Administrator,CN=Users,DC=jdomcsc,DC=nttest,DC=microsoft,DC=com

Encoding a Subject Name

Subject Names