summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-06-06 09:38:30 +0000
committeralecpl <alec@alec.pl>2008-06-06 09:38:30 +0000
commitcd67494a9c6f7ca3d9727e87db46249328425ebf (patch)
treeb99130dfc0509a4da05e4d6379a8fdd6ee1732f2 /program/include
parentcfe4a6baf462c0befa06b283366945130cabfa5b (diff)
- TLS support in LDAP connections: 'use_tls' property (#1485104)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_ldap.php4
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;