propagate the support of the new 'accept_selfsigned_certs' option to 'bind' module. #40

This commit is contained in:
Jordi Sanfeliu 2014-01-29 18:21:39 +01:00
parent 4f2b271f20
commit 8993df021c
1 changed files with 4 additions and 0 deletions

View File

@ -298,6 +298,10 @@ sub bind_update {
for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) { for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) {
my $l = trim($bl[$n]); my $l = trim($bl[$n]);
my $ua = LWP::UserAgent->new(timeout => 30); my $ua = LWP::UserAgent->new(timeout => 30);
$ua->ssl_opts(verify_hostname => 0)
if lc($config->{accept_selfsigned_certs}) eq "y";
my $response = $ua->request(HTTP::Request->new('GET', $l)); my $response = $ua->request(HTTP::Request->new('GET', $l));
my $data = XMLin($response->content); my $data = XMLin($response->content);
my $value; my $value;