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

RE: Troubles with binary attributes



Thanks Kurt,
	Excellent response.  Thank you very much.

	I was able to use octetString, so evertyhing works beautifully, and I dd
not need to modify my  client software.

Regards,
Steve

> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
> Sent: Friday, November 03, 2000 5:02 PM
> To: Steve Collins
> Cc: openldap-software@OpenLDAP. org
> Subject: Re: Troubles with binary attributes
>
>
> At 02:54 PM 11/3/00 -0800, Steve Collins wrote:
> >Hello,
> >    I'm (still) migrating from 1.2 to 2.x.  Today's problem
> concerns binary attributes.
>
> Note that binary in the context of LDAP doesn't mean arbitrary
> binary data, that is an string of octets (bytes) containing
> arbitrary data.  That's called an octetString.  In LDAP,
> the term binary refers to information described using Abstract
> Syntax Notation One (ASN.1) and encoded using the Basic Encoding
> Rules (BER).
>
> >I am trying to add binary data from LDIF (from the 1.x directory)
> >
> >binattr:: CICAgAiACAiAgAiACAiACAiACICACAgIg.......
> >
> >I redefined this attribute like so:
> >
> >attributeType  ( 1.3.6.1.4.1.1765.9902 NAME 'binattr'
> >   SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 )
>
> Is the value of binattr BER encoded instance of an ASN.1 data type?
>
> >
> >But when I try to add it:
> >ldap_add ......
> >dn: ......
> >binattr:: CICAgAiACAiAgAiACAiACAiACICACAgIg.......
> >
> >I get the following:
> >ldap_modify: Undefined attribute type
> >        additional info: attribute requires ;binary transfer
>
> 2.0.6 requires ";binary" transfer of the binary syntax.  [This
> is actually viewed as a bug by some and a necessary feature by
> others].
>
> >=================================================================
> =========
> >First, does the  ;binary means I must specify a file (cannot use
> the LDIF output from 1.2) ?
>
> No. It means you must provide a BER-encoded value.
> s
> >Second, the attribute type is defined for this operation, so I
> guess the "Undefined attribute type" message is misleading, right?
>
> Undefined attribute type result code is a reasonable response for
> the server to return if ;binary transfer is required but not
> specified.
>
> >Third, must I modify my client code to use "binattr;binary"?
>
> Likely you should define syntax of binattr to be octetString
> not binary.
>
> Kurt
>