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

cURL, libcurl, and LDAP



For those of you who use libcurl in your own applications, you may be interested to know that I've written a new LDAP implementation for libcurl.
http://article.gmane.org/gmane.comp.web.curl.cvs/13393

The old code had a number of problems, mainly due to exclusively using the synchronous LDAPv2 APIs, which prevented it from playing nicely in the otherwise fully-asynchronous libcurl framework. It also has a bug such that it always opens two connections to the LDAP server for every curl request. The old code is still there, for deployments stuck with older LDAP libraries (OpenLDAP 2.3, or non-OpenLDAP code).
The new code is fully asynchronous and non-blocking, written for OpenLDAP 2.4. 
It's also (surprise, surprise) far more efficient in parsing results. To cut 
down on duplication of config code, this module uses libcurl's existing socket 
and SSL infrastructure, instead of OpenLDAP's built in SSL/TLS support. Thus 
it automatically supports all of the libraries and features libcurl already 
supports, without needing any ongoing maintenance for when new libcurl 
features are added.
If you've got other tools already built around curl, you'll get improved LDAP 
support without making any other changes. If you're looking for ways to 
tightly integrate libldap support directly into your own applications, the 
libcurl OpenLDAP code can show you how.
--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/