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

Re: Empty IA5String




Hallvard,

Hallvard B Furuseth wrote:
Steven Legg writes:

Hallvard B Furuseth wrote:

[Syntaxes] section 3.3.15 says an IA5 String may be empty.

Why is that, when Directory String and Printable String may not?

The Directory String and Printable String syntaxes derive from syntaxes in X.520 that have been constrained to have at least one character. The IA5 String syntax does not have a counterpart in X.520 so it doesn't need to be constrained for interoperability reasons. (...) The working group needs to decide whether to restrict IA5 String to at least one character, or to allow empty strings to compare true.


My vote from an LDAP viewpoint would be minimal change, i.e. do not
disallow empty IA5 Strings.

OTOH, if an X.500 implementor wants to support IA5 String, maybe the
reason why X.500 requires 1+ characters in the other string syntaxes,
also would make the same restriction preferable in IA5 String?

Speaking as an X.500 implementor, I don't see any technical reason why string syntaxes have to have a non-zero length. I guess the X.500 designers thought zero-length strings weren't particularly useful so they disallowed them.

Zero-length strings haven't caused me any problems, nor has comparing
IA5String values to DirectoryString values. That is probably because the
string preparation that I currently use effectively produces an unconstrained
UniversalString, which can be zero length. I don't assume that the result
of the string preparation has to be a valid value of the original string type.
Having two empty strings compare true is the natural extrapolation of the
most obvious way to compare two strings of characters.

By the way, I've encountered clients that want to store zero-length DirectoryStrings.
It's totally bogus, but third-party vendors can be stubborn about making changes
when their application "works with other directory servers", so for our customer's
sake we need to provide workarounds.

For the record, I don't care whether IA5 String syntax is constrained to have
at least one character. However, I increasingly believe that stringprep should
be able to produce a zero-length string as input to a matching function.

Regards,
Steven