Add option to disable SSL certificate verification for LDAP.

This commit is contained in:
Francois Ferrand
2014-07-03 10:25:25 +02:00
parent 98bd694e2b
commit 0a3049c172
3 changed files with 9 additions and 0 deletions

View File

@@ -24,6 +24,11 @@ class Ldap extends Base
die('The PHP LDAP extension is required');
}
if (!LDAP_SSL_VERIFY) {
//Skip SSL certificate verification
putenv('LDAPTLS_REQCERT=never');
}
$ldap = ldap_connect(LDAP_SERVER, LDAP_PORT);
if (! is_resource($ldap)) {