On 05/20/2014 03:44 PM, Alon Bar-Lev wrote:
> On Tue, May 20, 2014 at 11:23 PM, Neil A. Wilson
> <nei...@un...> wrote:
>> On 05/20/2014 01:28 PM, Alon Bar-Lev wrote:
>>>
>>> Hi,
>>>
>>> I am unsure this is deliberate... the diagnosticMessage contains NULL
>>> \x0 character at end of string.
>>>
>>> Java does not know how to cope properly with these...
>>>
>>> Regards,
>>> Alon Bar-Lev
>>
>>
>> Could you provide more context in which this is happening? I don't see
>> anywhere that might be the case.
>>
>
> I communicate with Active Directory, just invalid user and password in
> this example, I get:
>
> 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext
> error, data 525, vece\0
>
> 0030 30 84 00 00 00 67 02 01 04 61 84 00 !..`0... .g...a..
> 0040 00 00 5e 0a 01 31 04 00 04 57 38 30 30 39 30 33 ..^..1.. .W800903
> 0050 30 38 3a 20 4c 64 61 70 45 72 72 3a 20 44 53 49 08: Ldap Err: DSI
> 0060 44 2d 30 43 30 39 30 33 33 34 2c 20 63 6f 6d 6d D-0C0903 34, comm
> 0070 65 6e 74 3a 20 41 63 63 65 70 74 53 65 63 75 72 ent: Acc eptSecur
> 0080 69 74 79 43 6f 6e 74 65 78 74 20 65 72 72 6f 72 ityConte xt error
> 0090 2c 20 64 61 74 61 20 35 32 35 2c 20 76 65 63 65 , data 5 25, vece
> 00a0 00
Assuming that this is a network packet capture, then Active Directory is
generating including that extra byte in the message. The LDAP SDK isn't
generating it.
> .
>
>> It's possible that you might be confused about the ASN1Buffer.addOctetString
>> method. The body of that method looks like:
>>
>> buffer.append(type);
>>
>> if (value == null)
>> {
>> buffer.append((byte) 0x00);
>> }
>> else
>> {
>> ASN1Element.encodeLengthTo(value.length, buffer);
>> buffer.append(value);
>> }
>>
>>
>> In this case, the 0x00 is the indicator of the length of the ASN.1 BER
>> element and not the value. That is, the resulting octet string element will
>> be encoded as "0400" (which is an empty octet string) and not "040100"
>> (which is an octet string comprised of the single byte 0x00).
>>
>>
>> Neil
>>
>>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> ldap-sdk-discuss mailing list
>> lda...@li...
>> https://lists.sourceforge.net/lists/listinfo/ldap-sdk-discuss
>>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> ldap-sdk-discuss mailing list
> lda...@li...
> https://lists.sourceforge.net/lists/listinfo/ldap-sdk-discuss
>
|