3. Analisi di una stringa per ricostruire un nome distinto
La rappresentazione in formato stringa dei Distinguished Name è limitata ai caratteri Unicode [Unicode] codificati in UTF-8 [RFC3629]. La struttura di questa rappresentazione in formato stringa è specificata mediante la seguente grammatica Augmented BNF [RFC4234]:
distinguishedName = [ relativeDistinguishedName
*( COMMA relativeDistinguishedName ) ]
relativeDistinguishedName = attributeTypeAndValue
*( PLUS attributeTypeAndValue )
attributeTypeAndValue = attributeType EQUALS attributeValue
attributeType = descr / numericoid
attributeValue = string / hexstring
; I seguenti caratteri devono essere sottoposti a escape quando
; compaiono nel valore da codificare: ESC, uno di <escaped>,
; SHARP o SPACE iniziale, SPACE finale e NULL.
string = [ ( leadchar / pair ) [ *( stringchar / pair )
( trailchar / pair ) ] ]
leadchar = LUTF1 / UTFMB
LUTF1 = %x01-1F / %x21 / %x24-2A / %x2D-3A /
%x3D / %x3F-5B / %x5D-7F
trailchar = TUTF1 / UTFMB
TUTF1 = %x01-1F / %x21 / %x23-2A / %x2D-3A /
%x3D / %x3F-5B / %x5D-7F
stringchar = SUTF1 / UTFMB
SUTF1 = %x01-21 / %x23-2A / %x2D-3A /
%x3D / %x3F-5B / %x5D-7F
pair = ESC ( ESC / special / hexpair )
special = escaped / SPACE / SHARP / EQUALS
escaped = DQUOTE / PLUS / COMMA / SEMI / LANGLE / RANGLE
hexstring = SHARP 1*hexpair
hexpair = HEX HEX
dove le produzioni
Ogni
Se in forma
sostituire <ESC><ESC> con <ESC>;
sostituire <ESC><special> con <special>;
sostituire <ESC><hexpair> con l'ottetto indicato dal <hexpair>.
Se in forma
Per un nome distinto relativo vi è una o più asserzioni di valore di attributo, separate da
Per un nome distinto vi sono zero o più nomi distinti relativi, separati da
Le implementazioni DEVONO (MUST) riconoscere le stringhe di nome AttributeType (descrittori) elencate nella tabella seguente, ma POSSONO (MAY) riconoscerne altre.
| Stringa | X.500 AttributeType |
|---|---|
| CN | commonName (2.5.4.3) |
| L | localityName (2.5.4.7) |
| ST | stateOrProvinceName (2.5.4.8) |
| O | organizationName (2.5.4.10) |
| OU | organizationalUnitName (2.5.4.11) |
| C | countryName (2.5.4.6) |
| STREET | streetAddress (2.5.4.9) |
| DC | domainComponent (0.9.2342.19200300.100.1.25) |
| UID | userId (0.9.2342.19200300.100.1.1) |
Questi tipi di attributo sono descritti in [RFC4519].
Le implementazioni POSSONO (MAY) riconoscere altre rappresentazioni in formato stringa dei DN. Tuttavia, poiché non è richiesto che le rappresentazioni alternative in formato stringa dei DN siano riconosciute (né, in tal caso, come), le implementazioni DOVREBBERO (SHOULD) generare stringhe di DN solo conformemente alla sezione 2 di questo documento.