From 5a9566eb3d0f6bfc9b909ab455222f5f6729a632 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Wed, 29 Jan 2014 18:22:51 +0100 Subject: [PATCH] propagate the support of the new 'accept_selfsigned_certs' option to 'lighttpd' module. #40 --- lib/lighttpd.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lighttpd.pm b/lib/lighttpd.pm index e65a9d7..6835c8f 100644 --- a/lib/lighttpd.pm +++ b/lib/lighttpd.pm @@ -146,6 +146,10 @@ sub lighttpd_update { foreach(my @ll = split(',', $lighttpd->{list})) { my $url = trim($_) . "/server-status?auto"; 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', $url)); if(!$response->is_success) {