z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_name_to_dn()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Converts an X.509 name to a DN string.

Format

#include <gskcms.h>

gsk_status gsk_name_to_dn (
                           x509_name *          name,
                           char **              dn)

Parameters

name
Specifies the X.509 name to be converted to a distinguished name string. The X.509 strings use UTF-8 encoding.
dn
Returns the distinguished name in the local code page. The application should call the gsk_free_string() routine to release the string when it is no longer needed.

Results

The function return value will be 0 if no error is detected. Otherwise, it will be one of the return codes listed in the gskcms.h include file. These are some possible errors:

[ASN_CANT_CONVERT]
The X.509 name is not a distinguished name.
[ASN_NO_MEMORY]
Insufficient storage is available.

Usage

The gsk_name_to_dn() routine converts an X.509 name to a distinguished name (DN) string in accordance with RFC 2253: UTF-8 String Representation of Distinguished Names. The DN string will consist of single-byte characters in the local code page. A double-byte character will be represented using the escaped UTF-8 encoding of the double-byte character in the UCS-2 or UCS-4 character set.

These DN attribute names are generated by the System SSL runtime. Unrecognized attribute types will be encoded using the numeric object identifier followed by the DER-encoded representation of the attribute value.

  • C - Country
  • CN - Common name
  • DC - Domain component
  • DNQUALIFIER - Distinguished name qualifier
  • EMAIL - E-mail address
  • GENERATIONQUALIFIER - Generation qualifier
  • GIVENNAME - Given name
  • INITIALS - Initials
  • L - Locality
  • MAIL - Mail RFC 822 style address
  • NAME - Name
  • O - Organization name
  • OU - Organizational unit name
  • PC - Postal code
  • SERIALNUMBER - Serial number
  • SN - Surname
  • ST - State or province
  • STREET - Street
  • T - Title

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014