Skip to content
Snippets Groups Projects
Commit b41345c0 authored by Olav Morken's avatar Olav Morken
Browse files

LDAP: allow enable_tls for ldaps://-urls

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@407 44740490-163a-0410-bde0-09ae8108e29a
parent 355cf520
No related branches found
No related tags found
No related merge requests found
...@@ -33,11 +33,11 @@ class SimpleSAML_Auth_LDAP { ...@@ -33,11 +33,11 @@ class SimpleSAML_Auth_LDAP {
$this->setV3(); $this->setV3();
if ($enable_tls) { if (!preg_match("/ldaps:/i",$hostname) and $enable_tls) {
if (!@ldap_start_tls($this->ldap)) { if (!@ldap_start_tls($this->ldap)) {
throw new Exception('Could not force LDAP into TLS-session. Please verify certificates and configuration. Could also be that PHP the LDAP library cannot connect to the LDAP server [' . $hostname . ']: ' . ldap_error($this->ldap) ); throw new Exception('Could not force LDAP into TLS-session. Please verify certificates and configuration. Could also be that PHP the LDAP library cannot connect to the LDAP server [' . $hostname . ']: ' . ldap_error($this->ldap) );
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment