Title:

UTF-8 String Representation of Distinguished Names

Home
Publication List
deutsch
  
ISBN: 3423050012   ISBN: 3423050012   ISBN: 3423050012   ISBN: 3423050012 
 
|<< First     < Previous     Index     Next >     Last >>|
  Wir empfehlen:       
 

2.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. The encoding of the AttributeValue is given in section 2.4.

If the AttributeType is in a published table of attribute types associated with LDAP [4], then the type name string from that table is used, otherwise it is encoded as the dotted-decimal encoding of the AttributeType's OBJECT IDENTIFIER. The dotted-decimal notation is described in [3]. As an example, strings for a few of the attribute types frequently seen in RDNs include:

String X.500 AttributeType
------------------------------
CN commonName
L localityName
ST stateOrProvinceName
O organizationName
OU organizationalUnitName
C countryName
STREET streetAddress
DC domainComponent
UID userid


2.4. Converting an AttributeValue from ASN.1 to a String

If the AttributeValue is of a type which does not have a string representation defined for it, then it is simply encoded as an octothorpe character ('#' ASCII 35) followed by the hexadecimal representation of each of the bytes of the BER encoding of the X.500 AttributeValue. This form SHOULD be used if the AttributeType is of the dotted-decimal form.

Otherwise, if the AttributeValue is of a type which has a string representation, the value is converted first to a UTF-8 string according to its syntax specification (see for example section 6 of [4]).

If the UTF-8 string does not have any of the following characters which need escaping, then that string can be used as the string representation of the value.

o a space or "#" character occurring at the beginning of the string

o a space character occurring at the end of the string

o one of the characters ",", "+", """, "\", "<", ">" or ";"

Implementations MAY escape other characters.

If a character to be escaped is one of the list shown above, then it is prefixed by a backslash ('\' ASCII 92).

Otherwise the character to be escaped is replaced by a backslash and two hex digits, which form a single byte in the code of the character.

Examples of the escaping mechanism are shown in section 5.

3. Parsing a String back to a Distinguished Name

The structure of the string is specified in a BNF grammar, based on the grammar defined in RFC 822 [5]. Server implementations parsing a DN string generated by an LDAPv2 client MUST also accept (and ignore) the variants given in section 4 of this document.

distinguishedName = [name] ; may be empty string

name = name-component *("," name-component)

name-component = attributeTypeAndValue *("+" attributeTypeAndValue)

attributeTypeAndValue = attributeType "=" attributeValue

attributeType = (ALPHA 1*keychar) / oid
keychar = ALPHA / DIGIT / "-"

oid = 1*DIGIT *("." 1*DIGIT)

attributeValue = string

string = *( stringchar / pair )
/ "#" hexstring
/ QUOTATION *( quotechar / pair ) QUOTATION ; only from v2

quotechar = <any character except "\" or QUOTATION >

special = "," / "=" / "+" / "<" / ">" / "#" / ";"

pair = "\" ( special / "\" / QUOTATION / hexpair )
stringchar = <any character except one of special, "\" or QUOTATION >

hexstring = 1*hexpair
hexpair = hexchar hexchar

hexchar = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
/ "a" / "b" / "c" / "d" / "e" / "f"

ALPHA = <any ASCII alphabetic character>
; (decimal 65-90 and 97-122)
DIGIT = <any ASCII decimal digit> ; (decimal 48-57)
QUOTATION = <the ASCII double quotation mark character '"' decimal 34>

  
Bürgerliches Gesetzbuch BGB
von Helmut Köhler
Siehe auch:
Handelsgesetzbuch HGB: ohne Seehandelsrech...
Arbeitsgesetze
Grundgesetz GG: Menschenrechtskonvention, Europäischer Gerichtsh...
Strafgesetzbuch StGB
Aktiengesetz · GmbH-Gesetz: mit Umwandlungsgesetz, Wertpapiererw...
Zivilprozeßordnung. ZPO
 
   
 
     
|<< First     < Previous     Index     Next >     Last >>| 

Back to the topic site:
ScientificPublication.com/Startseite/Informatik/Spezifikationen

External Links to this site are permitted without prior consent.

Publication List:
UTF-8 String Representation of Distinguished Names
UTF-8, a transformation format of ISO 10646
UTF-8, a transformation format of ISO 10647
   
  Home  |  deutsch  |  Set bookmark  |  Send a friend a link  |  Impressum