cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using LDAP with cURL give error 48

From: Osipov, Michael <michael.osipov_at_siemens.com>
Date: Wed, 8 Apr 2015 10:03:47 +0000

Hi folks,

I am trying to retrieve some attributes from our directory server but fail to do so.
I have successfully configured and compiled:

./configure --prefix=$HOME/curl-7.41.0 --with-gssapi=/usr/local --with-zlib \
 --disable-ftp --disable-rtsp --disable-dict --disable-pop3 --disable-gopher \
 --disable-imap --disable-tftp --disable-telnet --disable-ntlm-wb --disable-ssh \
 --disable-ldaps --enable-ldap

configure: Configured to build curl/libcurl:

  curl version: 7.41.0
  Host setup: i386-unknown-freebsd9.3
  Install prefix: /net/home/osipovmi/curl-7.41.0
  Compiler: gcc
  SSL support: enabled (OpenSSL)
  SSH support: enabled (libSSH2)
  zlib support: enabled
  GSS-API support: enabled (MIT Kerberos/Heimdal)
  TLS-SRP support: enabled
  resolver: default (--enable-ares / --enable-threaded-resolver)
  IPv6 support: no (--enable-ipv6)
  Unix sockets support: enabled
  IDN support: enabled
  Build libcurl: Shared=yes, Static=yes
  Built-in manual: enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors: enabled (--disable-verbose)
  SSPI support: no (--enable-sspi)
  ca cert bundle: /etc/ssl/cert.pem
  ca cert path: no
  LDAP support: enabled (OpenLDAP)
  LDAPS support: no (--enable-ldaps)
  RTSP support: no (--enable-rtsp)
  RTMP support: no (--with-librtmp)
  metalink support: no (--with-libmetalink)
  HTTP2 support: disabled (--with-nghttp2)
  Protocols: FILE HTTP HTTPS LDAP SCP SFTP SMB SMBS SMTP SMTPS

$ ./curl --version
curl 7.41.0 (i386-unknown-freebsd9.3) libcurl/7.41.0 OpenSSL/1.0.2a zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

Strage, ldap is not listed. It is listed here though:

n$ ./curl-config --protocols
FILE
HTTP
HTTPS
LDAP
SCP
SFTP
SMB
SMBS
SMTP
SMTPS

Linkage:
$ ldd ./curl
./curl:
        libcurl.so.7 => /usr/local/lib/libcurl.so.7 (0x28098000)
        libidn.so.11 => /usr/local/lib/libidn.so.11 (0x280f5000)
        libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x28126000)
        libssl.so.8 => /usr/local/lib/libssl.so.8 (0x2814b000)
        libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x281ad000)
        libgssapi_krb5.so => /usr/local/lib/libgssapi_krb5.so (0x28347000)
        libkrb5.so => /usr/local/lib/libkrb5.so (0x28388000)
        libk5crypto.so => /usr/local/lib/libk5crypto.so (0x28446000)
        libcom_err.so => /usr/local/lib/libcom_err.so (0x28476000)
        libldap-2.4.so.2 => /usr/local/lib/libldap-2.4.so.2 (0x28479000)
        libz.so.6 => /lib/libz.so.6 (0x284ba000)
        libc.so.7 => /lib/libc.so.7 (0x284ce000)
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x28603000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2860d000)
        libthr.so.3 => /lib/libthr.so.3 (0x28705000)
        libkrb5support.so => /usr/local/lib/libkrb5support.so (0x28726000)
        liblber-2.4.so.2 => /usr/local/lib/liblber-2.4.so.2 (0x28730000)
        libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x2873c000)

Now let's call cURL:
$ ./curl 'ldap://host.company.net'
curl: (48) An unknown option was passed in to libcurl

Any ideas?

The very same request works flawlessly with ldapsearch but I'd like to stay with curl because we use it already for HTTP and SMTP.

Thanks,

Michael

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-04-08