Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
51cc9588
Commit
51cc9588
authored
Feb 12, 2020
by
Francesc Guasch
Browse files
feature(ldap): force ssl version on connections
required for connect to older LDAP servers
parent
b07ba2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Auth/LDAP.pm
View file @
51cc9588
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment