Help! I am using the Netscape LDAP C++ SDK 5.06 to connect to a InJoin
directory server and can connect just fine with regular (non-SSL) API
calls and retrieve and set the data to my heart's content.

But, when I try to connect with SSL, I get an error on the bind and
any subsequent calls to the directory after the ldapssl_int call.
Here's the error I get:

ldap_search: Can't contact LDAP server
  SSL error -8101 (Certificate type not approved for application.)

I am able to make a secure connection to the directory with Netscape
4.7 and I am referencing the same cert7.db file as the browser. The CA
is an in-house CA and is not real keen on client-side certificates, so
he cannot really help me. Any suggestions or ideas?

Here's the code snippet:

if(ldapssl_client_init("E:\\Program Files\\Netscape\\Users\\lemmje",
NULL) != LDAP_SUCCESS) {
    cout << "Failed to initialize SSL client...\n" << endl;  
    return(1);  
} // end if

LDAP *ldapConn = ldapssl_init(HOSTNAME, LDAPS_PORT, 1);  // works
ldaperr = ldap_simple_bind_s(ldapConn, USERID, PASSWD);  // fails

Reply via email to