connection to SSL enabled ldap problem
am 27.11.2009 10:12:12 von Tanveer Chowdhury--0016e65b62ceefd355047956afaa
Content-Type: text/plain; charset=ISO-8859-1
Hi all
I am having a problem in connection to an SSL enabled ldap server.
In localhost is easily connects to the ldap server with SSL but if try to
connect remotely then it cannot bind to ldap server but can connect.
In the slapd.conf I added the 3 lines to enable SSL
TLSCACertificateFile /usr/local/openssl/misc/demoCA/cacert.pem
TLSCertificateFile /usr/local/openssl/misc/server-cert.pem
TLSCertificateKeyFile /usr/local/openssl/misc/server-key.pem
and then restarted the ldap which is also working in 636 port.
Currently its working in default port without SSL but whenever use the ssl
then it gives the message :
"Could not bind to ldap database"
I have installed the rpms and in phpinfo there is a --with-ssl option too.
Though I have generated the CA and server certificates with compiled
openssl.
Here is ldapconnect code;
// Ldap bind user credentials
$LDAP_Auth_User = "cn=Manager,dc=example,dc=com";
$LDAP_Auth_PWD = "password";
// Connecting to ldap server
$ldapconnect = ldap_connect ("ldaps://dc.example.com") or die ("Cannot
Connect to OpenLDAP Server");
// Checking whether ldap connection is successful
if ($ldapconnect) {
$bindldap = ldap_bind($ldapconnect,$LDAP_Auth_User, $LDAP_Auth_PWD) or die
("Could not bind to LDAP Database");
}
?>
Any idea.
--0016e65b62ceefd355047956afaa--