#include <ldap_ssl.h>
int ldapssl_client_init( const char *certdbpath, void *certdbhandle );
certdbpath | |
certdbhandle | Pass a NULL value for this. (This parameter is not used currently.) |
ldapssl_client_init() function to initialize your client application for SSL.
If you plan to use certificate-based authentication, you should call the ldapssl_clientauth_init() or ldapssl_advclientauth_init() function instead of this function.
You must call this function before calling the ldapssl_init() function to connect to the server. For details, see Chapter 12, "Connecting Over SSL".
#include <ldap.h>
#include <ldap_ssl.h>
#include <stdio.h>
...
/* Initialize client, using mozilla's certificate database */
if ( ldapssl_client_init( "/u/mozilla/.netscape/cert7.db", NULL ) < 0) { printf( "Failed to initialize SSL client...\n" );
return( 1 );
}
...
ldap_init(), ldapssl_init(), ldapssl_install_routines().
Last Updated: 10/01/98 17:06:23