better log TLS errors

This commit is contained in:
Roland Gruber 2011-10-24 15:24:35 +00:00
parent 0f098dc6a8
commit c258ae9689
1 changed files with 1 additions and 1 deletions

View File

@ -102,8 +102,8 @@ class Ldap{
$useTLS = $this->conf->getUseTLS();
if (isset($useTLS) && ($useTLS == "yes")) {
@ldap_start_tls($this->server);
// connect without TLS if it failed
if (ldap_errno($this->server) != 0) {
logNewMessage(LOG_ERR, 'Unable to start TLS encryption. Please check if your server certificate is valid and if the LDAP server supports TLS at all.');
return ldap_errno($this->server);
}
}