[Date Prev][Date Next]
cURL, libcurl, and LDAP
- To: openldap-technical@OpenLDAP.org
- Subject: cURL, libcurl, and LDAP
- From: Howard Chu <firstname.lastname@example.org>
- Date: Mon, 24 May 2010 21:06:24 -0700
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.9.3a5pre) Gecko/20100413 Firefox 3.6
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.
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/