I am trying to do LDAP authenticate with certificate in Ubuntu
My PHP Code as follows :
$ldap="ldap://myhostname";
$usr="myemail@domain.com";
$pwd="mypwd";
$ds=ldap_connect($ldap);
$ldapbind=false;
if(ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))
if(ldap_set_option($ds, LDAP_OPT_REFERRALS, 0))
if(ldap_start_tls($ds))
$ldapbind = @ldap_bind($ds, $usr, $pwd);
ldap_close($ds);
if(!$ldapbind)
echo "ERROR";
else
echo "OK";
In my ldap.conf file I added the following lines:
TLS_REQCERT never
TLS_CACERT /home/Desktop/rootCA.crt
But output as follows ldap_start_tls(): Unable to start TLS