Initializes the SSL (Secure Socket Layer) library.
#include <ldap_ssl.h> int ldapssl_client_init ( const char *certFile, void *reserved);
(IN) Points to the trusted root certificate file, a fully-qualified file path and the file must contain a DER encoded certificate.
(IN) Not currently used. Pass a NULL.
The LDAP SSL library provides SSL server authentication. In order to verify the server, the library needs to be configured with a trusted root certificate.
The certFile parameter is the fully qualified path of a file containing a trusted root certificate DER encoded.
It is also possible to pass NULL in the certFile parameter and use ldapssl_add_trusted_cert to add trusted root certificates to the LDAP SSL library. The API ldapssl_add_trusted_cert accepts DER and B64 (PEM) encoded certificates.
If the SSL handshake fails, the LDAP library returns an LDAP_SERVER_DOWN error. The handshake can fail because the server is down or because SSL has not been set up correctly on the client or LDAP server.
When you are finished with the SSL library, you should call the ldapssl_client_deinit function.
For sample code, see sslbind.c.