Chris,

At 16:28 (GMT+0100) on 3-June-2004, Chris Ridd wrote:
 > On 3/6/04 4:11 pm, Graham Barr <[EMAIL PROTECTED]> wrote:
 > 
 > > 
 > > 
 > > Begin forwarded message:
 > > 
 > >> From: Douglas Gray Stephens <[EMAIL PROTECTED]>
 > >> Date: 3 June 2004 15:58:41 BST
 > >> To: [EMAIL PROTECTED]
 > >> Subject: Potential bug in Net::LDAP (with binary data)
 > >> Message-Id: <[EMAIL PROTECTED]>
 > >> 
 > >> 
 > >> Graham,
 > >> 
 > >> I have an odd observation while working with a usercertificate;binary
 > >> data.  At present I have not tracked this down to Net::LDAP, but
 > >> thought that you may have some suggestions.
 > >> 
 > >> The attached perl replaces my certificate.  I have access to a few
 > >> servers (old Innosoft (strictly v2 with guess as to what the v3
 > >> standards would be), iPlanet 5.1, and SunOne 5.2 (both very much v3)).
 > 
 > Your script has this line:
 > 
 > my %change=(q{usercertificate;binary}=>[q{MIIDTDCCArWgAwIBA...
 > 
 > The value of the certificate should be binary on the wire, not base-64
 > encoded. So you should use the binary value in perl too..

OK, so using
 use MIME::Base64;
 my %change=(q{usercertificate;binary}=>[decode_base64(q{MIIDTDCCArW......

and I get the expected results (i.e. the certificate is correctly
loaded). 

 > Since you're sending junk to the servers, the server's *should* be rejecting
 > your modify operations. That they're not is a defect in each of the servers,
 > and you can't really expect any sort of sane behaviour from them.

So iPlanet 5.1HF2, SunOne 5.2HF1, and one of my Innosoft servers all
correctly updated the record.  One of the Innosoft servers had a
problem, but NONE of the server rejected the request.

There are perl differences on the machines, so hence my focus on
starting at the perl layer, rather than the code snippet that someone
else was using.

 > How do things change if you send the BER value instead of the base 64?

Works as expected.

Thank you for your comments,

Douglas.

-- 

================================
Douglas GRAY STEPHENS        
Technical Architect (Directories)
Schlumberger Cambridge Research
High Cross,
Madingley Road,
Cambridge.
CB3 0EL
ENGLAND

Phone  +44 1223 325295
Mobile +44 773 0051628
Fax    +44 1223 311830
Email [EMAIL PROTECTED]
================================

Reply via email to