mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
small docu about creating ssl (ldaps) or tls connections
This commit is contained in:
parent
ff867f4daf
commit
2cc8585ecb
@ -14,6 +14,11 @@
|
||||
|
||||
/**
|
||||
* LDAP connection handling
|
||||
*
|
||||
* Please note for SSL or TLS connections hostname has to be:
|
||||
* - SSL: "ldaps://host"
|
||||
* - TLS: "tls://host"
|
||||
* Both require certificats installed on the webserver, otherwise the connection will fail!
|
||||
*/
|
||||
class ldap
|
||||
{
|
||||
@ -105,10 +110,10 @@ class ldap
|
||||
$passwd = $GLOBALS['egw_info']['server']['ldap_root_pw'];
|
||||
}
|
||||
|
||||
if (($use_tls = substr($host,0,6) == 'tls://'))
|
||||
{
|
||||
$host = parse_url($host,PHP_URL_HOST);
|
||||
}
|
||||
if (($use_tls = substr($host,0,6) == 'tls://'))
|
||||
{
|
||||
$host = parse_url($host,PHP_URL_HOST);
|
||||
}
|
||||
// connects to ldap server
|
||||
if(!$this->ds = ldap_connect($host))
|
||||
{
|
||||
@ -132,7 +137,7 @@ class ldap
|
||||
{
|
||||
$supportedLDAPVersion = 2;
|
||||
}
|
||||
if ($use_tls) ldap_start_tls($this->ds);
|
||||
if ($use_tls) ldap_start_tls($this->ds);
|
||||
|
||||
if(!isset($this->ldapServerInfo[$host]))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user