Commit 51cc9588 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

feature(ldap): force ssl version on connections

required for connect to older LDAP servers
parent b07ba2ec
......@@ -585,7 +585,7 @@ sub _connect_ldap {
for my $retry ( 1 .. 3 ) {
if ($secure ) {
$ldap = Net::LDAPS->new($host, port => $port, verify => 'none')
$ldap = _connect_ldaps($host, $port);
} else {
$ldap = Net::LDAP->new($host, port => $port, verify => 'none')
}
......@@ -605,6 +605,17 @@ sub _connect_ldap {
return $ldap;
}
sub _connect_ldaps($host, $port) {
my @args;
push @args,(sslversion => $$CONFIG->{ldap}->{sslversion})
if exists $$CONFIG->{ldap}->{sslversion};
return Net::LDAPS->new($host, port => $port, verify => 'none'
,@args
)
}
sub _init_ldap_admin {
return $LDAP_ADMIN if $LDAP_ADMIN;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment