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

Re: namedref updates

"Kurt D. Zeilenga" wrote:
> Like much of slapd, it uses dn_validate/dn_normalize
> so will need more work once we have full, schema-aware
> DN validation/normalization in slapd.


I'll soon (tonight?) commit a more complete version 
of ldap_str2dn/dn2str; I also re-coded (under conditional 
compiling) the ldap_dn2ufn, ldap_dn2dcedn, dlap_dcedn2dn, 
ldap_explode_dn (I also added a non-standard ldap_explode_rdn 
and a ldap_dn2ad_canonical).

I made conditionally compilable the (bare-bone) utf-8 support,
that is, you can use ldap_utf_* routines to parse strings, or
simply look at bytes, turning '\' + 'HEXPAIR' into its byte
equivalent, and, on the converse, turning everything that is not
printable ( (c) >= '' && (c) <= '~' ) into '\' + 'HEXPAIR';
perhaps a better alternativeis to encode everything that matches
( (c) & 0x80 ) != 0x00 ).

The big part that is missing, I guess, is converting strings 
into ber-encoded binary when a non-printable string 
(that can exploit case by case '\' + 'HEXPAIR' encoding 
in LDAPv3) must be represented in LDAPv2; I guess I'd better 
do the same for DCE/AD, even though I'm not sure they understand
'#' + 'HEX'. Finally, what about UFN? We might understand it
as implicitly accepting utf-8 ('\' + 'HEXPAIR') or restrict
it to printable, reverting to '#' + 'HEX' in other cases.


Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy   |