Fixed incorrect invocation of start_tls
This commit is contained in:
parent
8d57d19288
commit
84ea3c8d72
@ -90,10 +90,10 @@ sub authenticate {
|
|||||||
if($username && $password) {
|
if($username && $password) {
|
||||||
# First obtain the user dn
|
# First obtain the user dn
|
||||||
my $userdn;
|
my $userdn;
|
||||||
my $ldap = Net::LDAP -> new($self -> {"server"});
|
my $ldap = Net::LDAP -> new($self -> {"server"}, version => 3);
|
||||||
|
|
||||||
if($ldap) {
|
if($ldap) {
|
||||||
$ldap -> start_tls('none') if($self -> {"usetls"});
|
$ldap -> start_tls(verify => 'none') if($self -> {"usetls"});
|
||||||
|
|
||||||
# Bind for the search - if the object has adminuser and password, bind with them,
|
# Bind for the search - if the object has adminuser and password, bind with them,
|
||||||
# otherwise fall back on using an anonymous bind.
|
# otherwise fall back on using an anonymous bind.
|
||||||
@ -120,7 +120,7 @@ sub authenticate {
|
|||||||
if(!$self -> {"reuseconn"}) {
|
if(!$self -> {"reuseconn"}) {
|
||||||
$ldap = Net::LDAP -> new($self -> {"server"});
|
$ldap = Net::LDAP -> new($self -> {"server"});
|
||||||
|
|
||||||
$ldap -> start_tls('none')
|
$ldap -> start_tls(verify => 'none')
|
||||||
if($ldap && $self -> {"usetls"});
|
if($ldap && $self -> {"usetls"});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user