diff options
author | alecpl <alec@alec.pl> | 2008-06-06 09:38:30 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-06-06 09:38:30 +0000 |
commit | cd67494a9c6f7ca3d9727e87db46249328425ebf (patch) | |
tree | b99130dfc0509a4da05e4d6379a8fdd6ee1732f2 /program | |
parent | cfe4a6baf462c0befa06b283366945130cabfa5b (diff) |
- TLS support in LDAP connections: 'use_tls' property (#1485104)
Diffstat (limited to 'program')
-rw-r--r-- | program/include/rcube_ldap.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index c5962030f..df68f34f8 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -94,6 +94,10 @@ class rcube_ldap { if ($lc = @ldap_connect($host, $this->prop['port'])) { + if ($this->prop['use_tls']===true || strtoupper($this->prop['use_tls'])==='TRUE') + if (!ldap_start_tls($lc)) + continue; + ldap_set_option($lc, LDAP_OPT_PROTOCOL_VERSION, $this->prop['ldap_version']); $this->prop['host'] = $host; $this->conn = $lc; |