Subject: Examples
Author: SteveHB
In response to: Special Characters in DN -- RFC-1779,2253,4514
Posted on: 11/27/2006 08:18:57 PM
This notation is designed to be convenient for common forms of name.
This section gives a few examples of distinguished names written
using this notation. First is a name containing three relative
distinguished names (RDNs):
UID=jsmith,DC=example,DC=net
Here is an example of a name containing three RDNs, in which the
first RDN is multi-valued:
OU=Sales+CN=J. Smith,DC=example,DC=net
This example shows the method of escaping of a special characters
appearing in a common name:
CN=James \"Jim\" Smith\, III,DC=example,DC=net
The following shows the method for encoding a value that contains a
carriage return character:
CN=Before\0dAfter,DC=example,DC=net
In this RDN example, the type in the RDN is unrecognized, and the
value is the BER encoding of an OCTET STRING containing two octets,
0x48 and 0x69.
1.3.6.1.4.1.1466.0=#04024869
Finally, this example shows an RDN whose commonName value consists of
5 letters:
Unicode Character Code UTF-8 Escaped
------------------------------- ------ ------ --------
LATIN CAPITAL LETTER L U+004C 0x4C L
LATIN SMALL LETTER U U+0075 0x75 u
LATIN SMALL LETTER C WITH CARON U+010D 0xC48D \C4\8D
LATIN SMALL LETTER I U+0069 0x69 i
LATIN SMALL LETTER C WITH ACUTE U+0107 0xC487 \C4\87
This could be encoded in printable ASCII [ASCII] (useful for
debugging purposes) as:
CN=Lu\C4\8Di\C4\87
>
> On 11/27/2006 08:10:08 PM
SteveHB wrote:
Special Characters was first defined in RFC 1179, then the modified versions RFC 2253 and RFC 4514
http://www.ietf.org/rfc/rfc4514.txt
If a value should contain any of the following characters
Character ASCII value Position RFC since
----------------------------------------------------------------------
'#' 0x23 at the beginning 2253, 4514
' ' 0x20 at the beginning or the end 2253, 4514
'"' 0x22 anywhere 1179
'+' 0x2b anywhere 1179
',' 0x2c anywhere 1179
';' 0x3b anywhere 1179 only
'<' 0x3c anywhere 1179
'=' 0x3d anywhere 1179, 2253
'>' 0x3e anywhere 1179
'\' 0x5c anywhere 1179
NUL 0x00 anywhere 4514
the character must be profixed by a backslash '\'. The others, like NULL or
non-printable char, must be encoded as the backslash '\' character (ASCII
0x5c) followed by the two hexadecimal digits representing the ASCII
value of the encoded character. The case of the two hexadecimal
digits is not significant.
References: