From 84ea3c8d72ab6242769316036106a78abe5f38cd Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 4 Sep 2013 14:25:44 +0100 Subject: [PATCH] Fixed incorrect invocation of start_tls --- Webperl/AuthMethod/LDAP.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Webperl/AuthMethod/LDAP.pm b/Webperl/AuthMethod/LDAP.pm index 28efd59..b8168c8 100644 --- a/Webperl/AuthMethod/LDAP.pm +++ b/Webperl/AuthMethod/LDAP.pm @@ -90,10 +90,10 @@ sub authenticate { if($username && $password) { # First obtain the user dn my $userdn; - my $ldap = Net::LDAP -> new($self -> {"server"}); + my $ldap = Net::LDAP -> new($self -> {"server"}, version => 3); 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, # otherwise fall back on using an anonymous bind. @@ -120,7 +120,7 @@ sub authenticate { if(!$self -> {"reuseconn"}) { $ldap = Net::LDAP -> new($self -> {"server"}); - $ldap -> start_tls('none') + $ldap -> start_tls(verify => 'none') if($ldap && $self -> {"usetls"}); }