7 String Representation of DN

32.106-83GPPConfiguration Management (CM)Part 8: Name convention for Managed ObjectsRelease 1999Telecommunication managementTS

This clause specifies the string representation of DN. This work is based on IETF RFC 2253 [7]. A DN string representation, using the string-encoding scheme specified in the present document, is also a valid DN string according to IETF RFC 2253 [7].

The string-encoding scheme specified in the present document imposes further restrictions as compared to IETF RFC 2253 [7]. The most important restrictions are:

  • Multi-valued RDN is not supported in the subject name convention.
  • Character star (‘*’, ASCII 42) is used to denote wildcard in the subject name convention.

7.1 Converting DN from ASN.1 to a String

The following subclauses define the algorithm for converting from an ASN.1 structured representation to string representation.

7.1.1 Converting RDNSequence

If the RDNSequence is an empty sequence, the result is the empty or zero length string.

Otherwise, the output consists of the string encoding of each RDN in the RDNSequence (according to subclause 7.1.2), starting with the first element of the sequence and moving forward toward the last element.

The encoding of adjacent RDNs are separated by a comma character (“,”, ASCII 44), to be consistent with IETF RFC 2253 [7].

White spaces adjacent to the slash character shall be ignored.

7.1.2 Converting RelativeDistinguishedName

When converting from an ASN.1 RDN to a string, the output consists of the string encoding of the singleton AttributeTypeAndValue (according to subclause 7.1.1).

Although X.500 DN supports multi-valued RDN, this specification supports single-valued RDN only.

7.1.3 Converting AttributeTypeAndValue

The AttributeTypeAndValue is encoded as the string representation of the AttributeType, followed by an equals character (‘=’, ASCII 61), followed by the string representation of the AttributeValue.

Although X.500 ASN.1 AttributeValue and AttributeType support wide range of character representation, this specification supports a restrictive set of characters according to subclause 7.2.

String representation of AttributeValue allows character escape mechanism such as the use of a backslash followed by two hex digits to replace a character in a string. String representation of AttributeType does not allow character escape mechanism.

EXAMPLE: “CN=Before\0DAfter,O=Test,C=GB. In this example, the backslash and the two hex digits form a single byte in the code of the escaped character. The backslash followed by “0D” indicates a carriage return. See Annex B for a rule for MO designers to avoid ambiguity concerning the AttributeType of a DN string.

7.2 Character syntax

This subclause specifies the character syntax for AttributeType and AttributeValue.

They are:

  1. Any character except <special> where <special> is

“,”, “=“, <CR>, <LF>, “+”, “<“, “>“, “#”, “;”, “\” or “““

  1. The dot character (‘.’, ASCII 46). This character shall be used in the AttributeValue whose AttributeType is “DC”. An example is “DC=lme.companyZ.se”. This dot character shall not be used in AttributeType.
  2. The star character (‘*’, ASCII 42) is reserved to denote wild card. Wild card character(s) can appear in AttributeType and AttributeValue.

7.3 BNF of DN String Representation

The following is the BNF for DN in string representation (Backus-Naur Form is popular in IETF specifications to define format syntax. See [10] for more information):

DistinguishedName := RDNSequence

<spaced-separator> ::= <optional-space> <separator> <optional-space>

<separator> ::= ","

<optional-space> ::= ( <CR> ) *( " " )

RDNSequence := RDNSequence <spaced-separator>

RDNSequence | RelativeDistinguishedName

RelativeDistinguishedName := AttributeTypeAndValue

AttributeTypeAndValue := AttributeType "=" AttributeValue

<special> ::= "," |"=" |<CR> |<LF> |"+" |"<" |">" |"#" |";" |"\" | """

AttributeType := <one or more StringChar>

AttributeValue := <one or more StringChar>

StringChar := any character except <special>

7.4 Maximum size of DN string

The maximum length of a DN string, including RDN separators and including white spaces, shall not exceed 400 bytes (8-bit).