mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch '2716-ue-plugin-modifications' into 'develop'
Improved LWP ssl ignore certificate added extra debug See merge request artica/pandorafms!1723
This commit is contained in:
commit
e3f6a794a4
@ -936,7 +936,10 @@ sub call_url {
|
|||||||
|
|
||||||
if ($response->is_success){
|
if ($response->is_success){
|
||||||
return $response->decoded_content;
|
return $response->decoded_content;
|
||||||
|
} elsif (!empty($response->{'_msg'})) {
|
||||||
|
print_stderror($conf, 'Failed: ' . $response->{'_msg'});
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -958,7 +961,10 @@ sub post_url {
|
|||||||
|
|
||||||
if ($response->is_success){
|
if ($response->is_success){
|
||||||
return $response->decoded_content;
|
return $response->decoded_content;
|
||||||
|
} elsif (!empty($response->{'_msg'})) {
|
||||||
|
print_stderror($conf, 'Failed: ' . $response->{'_msg'});
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,6 +993,12 @@ sub init {
|
|||||||
# Disable verify host certificate (only needed for self-signed cert)
|
# Disable verify host certificate (only needed for self-signed cert)
|
||||||
$conf->{'__system'}->{ua}->ssl_opts( 'verify_hostname' => 0 );
|
$conf->{'__system'}->{ua}->ssl_opts( 'verify_hostname' => 0 );
|
||||||
$conf->{'__system'}->{ua}->ssl_opts( 'SSL_verify_mode' => 0x00 );
|
$conf->{'__system'}->{ua}->ssl_opts( 'SSL_verify_mode' => 0x00 );
|
||||||
|
|
||||||
|
# Disable library extra checks
|
||||||
|
BEGIN {
|
||||||
|
$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
|
||||||
|
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user