From: Kurt Zeilenga Date: Tue, 6 Aug 2002 03:52:02 +0000 (+0000) Subject: Add start of discussion of strings in LDAP/X.500 and OpenLDAP. X-Git-Tag: NO_SLAP_OP_BLOCKS~1275 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=82540c5cc1be5bf17b22f3a41d12d1bc56180654;p=openldap Add start of discussion of strings in LDAP/X.500 and OpenLDAP. --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index a1da1f6506..aa15dc3312 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -5,6 +5,52 @@ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ +/**** +LDAP/X.500 string syntax / matching rules have a few oddities. This +comment attempts to detail how slapd(8) treats them. + +Directory String - + In X.500(93), a directory string can be either a PrintableString, + a bmpString, or a UniversalString (e.g., UCS (a subset of Unicode)). + In later versions, more CHOICEs were added. In all cases the string + must be non-empty. + + In LDPAv3, a directory string is a UTF-8 encoded UCS string. + + For matching, there are both case ignore and exact rules. Both + also require that "insignificant" spaces be ignored. + spaces before the first non-space are ignored; + spaces after the last non-space are ignored; + spaces after a space are ignored. + Note: by these rules (and as clarified in X.520), a string of only + spaces is to be treated as if held one space, not empty (which would + be a syntax error). + +NumericString + In ASN.1, numeric string is just a string of digits and spaces and + could be empty. However, in X.500, all attribute values of numeric + string carry a non-empty constraint. Unfornately, some assertion + values are don't carry this constraint (but its unclear how such + an assertion could ever be true). In LDAP, there is one syntax + (numericString) not two (numericString with constraint, numericString + without constraint). This should be treated as numericString with + non-empty constraint. + + In matching, spaces are ignored. + +PrintableString + In ASN.1, Printable string is just a string of printable characters and + can be empty. In X.500, semantics much like NumericString excepting + uses insignificant space handling instead of ingore all spaces. + +IA5String + Basically same as PrintableString. + +****/ + + + + #include "portable.h" #include