Subject: Re: When to transmit binary

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Wed, 20 Dec 2000 08:47:46 -0800

At 04:41 PM 11/15/00 -0700, Jim Sermersheim wrote:
>Section 4.1.6 in RFC 2251states:
> 
>"A field of type AttributeValue takes on as its value either a string encoding of a AttributeValue data type, or an OCTET STRING containing an encoded binary value, depending on whether the "binary" option is present in the companion AttributeDescription to this AttributeValue."
> 
>We should state, in addition to the case where the binary option is present, that any AttributeValue with a Binary syntax is also encoded as binary. Right?

No.  The binary syntax, like many other syntaxes (e.g. JPEG) provide
a string encoding.  The fact that string encodings may or may
not be restricted UTF-8 characters, per the attribute value data
type description, is irrelevant to the above statement.

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Wed, 20 Dec 2000 11:47:23 -0800

>"A field of type AttributeValue takes on as its value either a string encoding of a AttributeValue data type, or an OCTET STRING containing an encoded binary value, depending on whether the "binary"…

One thing that some have found confusing is whether or not there is an additional OCTET STRING
wrapper around the encoded binary value.  That is, the statement can be read:

  For the binary option, a field of type AttributeValue, an OCTET STRING, takes on its value an
  OCTET STRING containing an encoded binary value.   Otherwise, a field of type AttributeValue,
  an OCTET STRING, takes as its value a string encoding of a AttributeValue data type.

For the binary option, this seems inconsistent with 4.1.5.1, RFC2252 4.3.1, and prior discussions
on the LDAPext list.  I suggest the wording be changed to:

  A field of type AttributeVale, an OCTET STRING, takes on as its value either a string encoding
  of the value, or the BER encoding of the of the value, depending on whether the "binary" option
  is present in the companion AttributeDescription of this AttributeValue.

I also believe that RFC2252, 4.3.1 needs to be clarified to state that as the binary syntax itself
is not described using ASN.1, values of binary syntax can not be transferred using the ";binary"
option.  That is, given:
        ( 1.2.3 NAME 'foo' SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 )
"foo;binary" is makes no sense.  The attribute should simply be transferred using the defined
string encoding of the attribute, e.g. as "foo".

Kurt