From 8993df021c6254c4dde930405665a8d995e3bfcf Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 29 Jan 2014 18:21:39 +0100 Subject: [PATCH] propagate the support of the new 'accept_selfsigned_certs' option to 'bind' module. #40 --- lib/bind.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bind.pm b/lib/bind.pm index 974cfdb..0323096 100644 --- a/lib/bind.pm +++ b/lib/bind.pm @@ -298,6 +298,10 @@ sub bind_update { for($n = 0; $n < scalar(my @bl = split(',', $bind->{list})); $n++) { my $l = trim($bl[$n]); 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 $data = XMLin($response->content); my $value;