Sets the routine to be called during SSL connection establishment if the server certificate received is not trusted.
#include <ldap_ssl.h> int ldapssl_set_verify_callback ( int (LIBCALL *certVerifyFunc)(void*) );
(IN) Callback routine, called during SSL connection establishment if the server certificate received is not trusted.
The certVerifyFunc must be a pointer to a function that takes one parameter (a void *) and returns an int.
If an untrusted server certificate is received while establishing an SSL connection, the callback routine is called with a handle to the certificate (void*).
This handle can be passed into ldapssl_get_cert_attribute to query specific certificate information.
In order to accept the server certificate and continue the SSL connection, the callback routine should return LDAPSSL_CERT_ACCEPT. To reject the server certificate and abort the connection the callback routine should return LDAPSSL_CERT_REJECT.
For sample code, see sslbind_interactive.c.