[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Null strings in LDAP



> We have been translating the ASN.1 notation of the attributes in ACP 133 to
> the notation used by LDAP. In several cases, zero-length strings could be
> returned. When we look at the guidelines in RFC 822 and RFC 2252, it looks
> as though strings cannot be zero-length. Is this true? Is there some way
> around it?

You'll need to be more specific about _which_ strings.  It is legal to have,
for example, a value of serialNumber, which has a Printable String syntax, 
be of zero length.  Also for example a CN, which has a Directory String 
syntax, be of zero length. 

The BNF productions in section 4.1 are used in constructing other encodings.
Note that they are NOT used by the syntax definitions of for Numeric String 
and Printable String syntaxes.    The 'numericstring' production is used only 
in numericoid and in a length field.  Requiring each element of an OID be of 
at least one digit means "1.2..4.5" is not an OID. But then that wouldn't be 
legal in ASN.1 either.  The 'printablestring' production is used in fax-number 
in facsmileTelephoneNumber and as mailbox-type in otherMailbox.  In these cases
I believe it is justified to require that a fax number or a mailbox type 
contain at least one character.

Mark Wahl, Directory Product Architect
Innosoft International, Inc.