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

Re: ldap binary attributes



Christopher Oliva wrote:
> ...
> If the ldap server is configured to expect the octet string syntax for a
> given attribute and the values must be explicitly encoded as octet
> string, what does the ldap C API draft require? Binary values added in
> the ldapmod struct must be added via the mod_bvalues variant. Does this
> (combined with paragraph 4.1.6 of rfc 2251) indicate that the
> implementation must automatically encode such a binary value as an octet
> string? Or does the user do it with ber_printf? And what is the server
> expected to do with these values when decoding and when encoding for a
> response to the client (i.e. will the value returned by the server need
> to be decoded by the client using ber_scanf to remove the octet string
> header)?

My interpretation is that AttributeValues are always passed as Octet
Strings within LDAP itself.  The LDAP C API just takes whatever value is
provided, wraps it in an Octet String as required by the protocol, and
ships it off to the server.  When decoding, the Octet String wrapper is
essentially removed by the API implementation.  I don't think users of
the API have to worry about this at all.

-- 
Mark Smith
Directory Architect / Netscape Communications Corp.
My words are my own, not my employer's.  Got LDAP?