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

Re: ldap_ssl_client_init equivalent?

phiroc@free.fr wrote:

is there a ldap_ssl_client_init function in the openldap C API? I couldn't
find any in the openldap header files.

No, nor is one needed. A single ldap_initialize() API does everything needed for all LDAP session types. Requiring a separate API for each connection type would be stupid, and require pointless API revving when new types are added.

What is the equivalent of the following ldapsearch query in C using the API, on Linux?

If you want to know how ldapsearch does a query in C, just read the ldapsearch source code.

ldapsearch -x -H 'ldaps://activedirectory.abc.com/636'
-b 'dc=abc,dc=com' -D 'testdn'
-W '(&(objectclass=user)(!(objectclass=computer))(samaccountname=myname))'

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/