|
Next: 10.1.5 Retrieving the commURI Up: 10.1 H.323 Previous: 10.1.3 Logging to the
|
To connect to an LDAP server using SSL:
#include <ldap_ssl.h>
#include <stdio.h>
...
/* Initialize client, using our certificate database */
if ( ldapssl_client_init( "/mypath/cert7.db", NULL ) < 0) {
printf( "Failed to initialize SSL client...\n" );
return( 1 );
}
/* Get a handle to an LDAP connection */
if ( (ld = ldapssl_init( ldap_host, LDAPS_PORT, 1 )) == NULL {
perror( "ldapssl_init" );
return( 1 );
}
...