From 50865683c1a6653f3ab707662aef7d7ce5a94216 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 6 Jul 2020 19:06:05 +0200 Subject: [PATCH] fixed the error message 'Error: 500 Can't connect to ...' when certificate verification failed, in 'phpfpm.pm' --- lib/phpfpm.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/phpfpm.pm b/lib/phpfpm.pm index 7d6de47..0eb95e2 100644 --- a/lib/phpfpm.pm +++ b/lib/phpfpm.pm @@ -174,7 +174,8 @@ sub phpfpm_update { next; } - $ssl = "ssl_opts => {verify_hostname => 0}" + $ssl = "ssl_opts => {verify_hostname => 0}", + $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0 if lc($config->{accept_selfsigned_certs}) eq "y"; my $ua = LWP::UserAgent->new(timeout => 30, $ssl); $ua->agent($config->{user_agent_id}) if $config->{user_agent_id} || "";