diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-06 09:38:30 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-06-06 09:38:30 +0000 |
| commit | 0d60182b7afd1f301e8beb62dbb9f90f888b4795 (patch) | |
| tree | 61dbc5d777ad41b701917911184fc395439ba481 /roundcubemail/program/include | |
| parent | 247039e1a2f5619009ed054733b320bba4038227 (diff) | |
- TLS support in LDAP connections: 'use_tls' property (#1485104)
git-svn-id: https://svn.roundcube.net/trunk@1481 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index c5962030f..df68f34f8 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/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; |
