Sangita Mohan wrote:
I am working on authentication via SSL. I am using the ldap_set_option to set the path to the certificate file. I am able to successfully authenticate when using the
int rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, "C:\\Cert.cer");
I also noticed the option LDAP_OPT_X_TLS_CACERTDIR. However it fails when used by itself. I am having to set a dummy LDAP_OPT_X_TLS_CACERTFILE before setting LDAP_OPT_X_TLS_CACERTDIR. Is this correct?
Just use the CACERTFILE. See the ldap.conf(5) manpage for information on the CACERTDIR. For most sites it is useless.
Thanks for your time.
Sangita