diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm index 4046059cd2..5dbed59ac7 100644 --- a/pandora_server/lib/PandoraFMS/PluginTools.pm +++ b/pandora_server/lib/PandoraFMS/PluginTools.pm @@ -936,7 +936,10 @@ sub call_url { if ($response->is_success){ return $response->decoded_content; + } elsif (!empty($response->{'_msg'})) { + print_stderror($conf, 'Failed: ' . $response->{'_msg'}); } + return undef; } @@ -958,7 +961,10 @@ sub post_url { if ($response->is_success){ return $response->decoded_content; + } elsif (!empty($response->{'_msg'})) { + print_stderror($conf, 'Failed: ' . $response->{'_msg'}); } + return undef; } @@ -987,6 +993,12 @@ sub init { # Disable verify host certificate (only needed for self-signed cert) $conf->{'__system'}->{ua}->ssl_opts( 'verify_hostname' => 0 ); $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; + } } } };