From cd67494a9c6f7ca3d9727e87db46249328425ebf Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Fri, 06 Jun 2008 05:38:30 -0400 Subject: [PATCH] - TLS support in LDAP connections: 'use_tls' property (#1485104) --- 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 c596203..df68f34 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -94,6 +94,10 @@ { 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; -- Gitblit v1.9.1