fixed the error message 'Error: 500 Can't connect to ...' when certificate verification failed, in 'phpfpm.pm'

This commit is contained in:
Jordi Sanfeliu 2020-07-06 19:06:05 +02:00
parent af7d2335dc
commit 50865683c1
1 changed files with 2 additions and 1 deletions

View File

@ -174,7 +174,8 @@ sub phpfpm_update {
next; 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"; if lc($config->{accept_selfsigned_certs}) eq "y";
my $ua = LWP::UserAgent->new(timeout => 30, $ssl); my $ua = LWP::UserAgent->new(timeout => 30, $ssl);
$ua->agent($config->{user_agent_id}) if $config->{user_agent_id} || ""; $ua->agent($config->{user_agent_id}) if $config->{user_agent_id} || "";