Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ANNOUNCE ocamldap 2.1.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-03-10 (02:34)
From: Eric Stokes <eric.stokes@c...>
Subject: ANNOUNCE ocamldap 2.1.0
I am pleased to announce the release of ocamldap 2.1.0.  If you ever 
have to interact with an ldap server (or you need to write one), you 
can do now it in Ocaml in a highly painless way. Note, for those people 
who still believe that C is always faster (no one on this list I know, 
but I vent my frustration), I am proud to announce that in this release 
ocamldap's ldap decoder is faster than the one included with OpenLDAP 
2.2.x. Thank you INRIA for making a compiler/runtime that doesn't suck.

Because I did not announce the release of 2.0 I will include the 
changelog back to 2.0.0.
    * ocaml-ssl is now required
    * BER Decoder
      - Improved decoding performance, 2x speedup. Beats OpenLDAP 2.2's
        decoder by about 5% (tested on PPC Mac OS X, and Intel Linux)
      - Fixed decoding of negative integers
      - Fixed decoding of error codes to comply with rfc2251. Unknown 
        codes will now be returned as `UNKNOWN_ERROR of int according to 
the rfc.
      - Fixed buggy decoding of ldap controls. They were not well tested
        until now, and several misinterpertations of the standard 
      - Fixed a bug which only happens when controls are asserted, some
        operations with optional values at the end would fail to decode
        when the control was present because of improper boundry setting.
        Boundries are now set at the end of each operation.
    * BER Encoder
      - Fixed several bugs in the encoding of two's complement integers
        where the sign bit was not being handled correctly. This never
        effected ldap clients, but severly limited the functionality of 
        servers. They would be unable to respond to requests with 
message id
        128, which would cause most clients to hang
      - Fixed discrepancies between the ldap_errorcode variant type, and 
        type recognized by encode_ldapresultcode. They are now the same 
        and no exception can be raised, the compiler will now prove that 
        code doesn't send a variant which cannot be recognized.
    * ldap_funclient
      - Studied OpenLDAP's client library in depth, and adapted msgid
        allocation to look exactly like theirs. This will expose fewer
        bugs in ldap servers.
      - Changed the msgid type to an int32 (this should not be a visible
        change, it is an opaque type).
      - Refactored readbyte implementations, moved them to, and
        tightened their exception handling.
    * ldap_ooclient
      - connect_timeout is now available as an optional argument to
      - added a method called "diff" to the ldapentry higharchy. It
        takes an entry and returns a list of differences between itself
        and the specified entry in the form of a modify record.
    * ldap_funserver
      - Deal with protocol errors according to rfc2251
      - Use the new readbyte implementations in instead of a
        custom one
      - Implemented a logging harness. You pass in a function (optional) 
        init which takes a log level, and a string. The server will send 
        function log lines which exactly match the log format of 
        The default function does nothing with the log lines. A parser 
        this log format is in the works and will be released as a 
    * LDIF Parser improvements
      - Improved the performance of write_entry, and to_string in Ldif_oo
      - Fixed a bug in the LDIF parser which could cause it to return
        the wrong line count when it finds a syntax error.
    * RFC 2252 schema parser/lexer
      - Fixed a typo in the lexer which would cause it
        not to correctly lex non numeric OIDs
      - Fixed bad lexing of X- attributes. There was an error in
        the definition of qdstring which would cause the lexer to eat
        all of the X- attributes in one pass. Tested fix
        with Active Directory 2003, OpenLDAP, and Novell eDirectory.
      - Changed the type of the attribute length field in the attribute
        record of the schema parser to be an Int64. The standard
        does not define the numeric range, and vendors
        (Novell) use huge numbers.
    * Schema Checker
      - Handled the case where the entry being checked does not have the
        objectclass attribute. Objectclass: top will be now be added in
        this case.
      - Fixed a bug in the "of_entry" method. It did not do a full schema
        check after importing the entry, so after calling of_entry the
        scldapentry was not proven to be valid.
    * Url Parser
      - Fixed a bug which could cause the url parser to return the wrong
        hostname if the hostname specified contained illegal characters.
    * Error Handling
      - moved err2string to a new module Ldap_error, which will contain
        functions for doing various things with LDAP_Failure exceptions.
        This WILL break existing applications which use err2string,
        however it is a simple matter of opening Ldap_error to fix them.
      - Implemented ldap_perror, and ldap_strerror functions, which
        either print, or return nicely formatted strings describing an
        LDAP_Failure exception.
    * Handle additional Unix_error exceptions as reconnection events,
      including EPIPE, ECONNRESET, and ECONNABORTED. Not handling these
      exceptions caused the library not to autoreconnect when the 
      was dropped under certian circumstances.
    * Fixed a bug in the way delete was encoded which prevented it from 
    * Fixed a major bug in async calls.
    * Complete reimplementation of the low levels.
      - Pure Ocaml lber, and ldap protocol implementation. Ocamldap is
        no longer a C binding.
      - Server side as well as client side encoding/decoding
        functions. You can now make ldap servers with Ocamldap,
        as well as be a client!
      - No code optimization has been done yet, however the decoding
        performance is within 50% of the C library on the same hardware!
        Encoding performance has not been tested yet.
    * Some api changes to support additional error information, referrals
      and enhanced client side reliability. Minimal OO api changes,
      fairly significant lower level api changes
    * Module name reorganization. Painful, but it can only get worse
      if we let it stay the way it was. These two changes are the main
      reason for the 2.0 stamp.
    * Greatly simplified build system
    * All portions of the library are now covered by the LGPL license