next up previous
Next: 10.1.5 Retrieving the commURI Up: 10.1 H.323 Previous: 10.1.3 Logging to the

10.1.4 Enabling Your Client to Connect Over SSL

To connect to an LDAP server using SSL:

  1. Initialize your client by calling one of the following functions:

    1. Call ldapssl_client_init() if you do not plan to use certificate-based client authentication.
    2. Call ldapssl_clientauth_init() if you plan to use certificate-based client authentication.
  2. Initialize an LDAP session with the secure server by calling the ldapssl_init() function. This is instead of calling ldap_init().
Example:

#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 );

}

...


next up previous
Next: 10.1.5 Retrieving the commURI Up: 10.1 H.323 Previous: 10.1.3 Logging to the

Video Middleware Cookbook
Questions and Comments : Cookbook Editors