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

Re: dnValidate (was: Re: UTF8 case insensitive matching)


On Fri, Dec 22, 2000 at 01:27:55PM -0500, David A. Cooper wrote:
> Based on earlier discussions, I have been working on a version of dnValidate that will read in a distinguished name that was generated based on RFC 2253 (or RFC 1779) and will return a normalized version of that string (compliant with RFC 2253).

I started to look into this as well, but have been working mostly on Unicode
normalization. I probably have some code ready for use in 2-3 weeks. When
normalizing the dn, we should also do Unicode normalization I think.

> The code that I produced will handle attribute values of type Directory string whether they are provided as a string, a quoted string, or a BER encoded string. It can similarly handle attribute values of type bitstring.
> Unlike the dnValidate function currently in servers/slapd/schema_init.c, I have added two additional parameters: make_uppercase and compress_whitespace.
> If make_uppercase is set, then all of the characters in the string are made uppercase (using uctoupper), otherwise the cases of the characters in the attribute values are left unchanged.

I know that uppercasing is used now, but I'm wondering if it would be
better to do lowercasing. In most cases there are mostly lower case
characters to begin with (I think).

> For my own purposes, for the short term, my plan is to re-write dn_validate and dn_normalize as functions that call my version of dnValidate and then overwrite the original string with the string returned by dnValidate (if the normalized string will fit).

Do you plan to look at the case where it won't fit later?

I had planned to do what you did later, but I'm glad you did it, then I
can find time for other things (: