cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Does libcurl supports LDAP connections over SOCKS proxy?

From: Anton Malov <malov.anton_at_gmail.com>
Date: Wed, 14 Nov 2012 19:28:19 +0400

>> static CURLcode Curl_ldap(struct connectdata *conn, bool *done) in
>> ldap.c. And there strange things happens. First of all there is a call
>> to ldap_init(conn->host.name, (int)conn->port); where first parameter
>> is ldap directory host, and second parameter is proxy port
>
> What LDAP is this using? It looks like you're talking about the windows
> ldap API (lib/ldap.c), are you?

Yes, windows LDAP API.

> If so, that code does indeed call ldap_init() and from what I can see in
> online documentation that connects to the server by itself and thus it
> won't work through a proxy.

I get it, but why is it using host address but proxy port for
connection? This behavior should be considered as bug, IMHO. Or maybe
there should be some notification like "Proxy not supported, using
direct connection instead."

> If you build with openldap (lib/openldap.c) instead, it uses
> ldap_init_fd() and that is supposed to instead work on the given socket
> instead of trying to create a new one.

Is there any manual about how to build curl with openldap.c on Windows?

Anyway, thanks for your consulting.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-11-14