+ Better way to manage the two ssl backend for lwp

This commit is contained in:
garnier-quentin 2016-01-04 15:37:21 +01:00
parent 323e843460
commit 4d076a4bb0

View File

@ -36,7 +36,19 @@ use centreon::vmware::connector;
my ($centreon_vmware, $frontend);
BEGIN {
# In new version version of LWP (version 6), the backend is now 'IO::Socket::SSL' (instead Crypt::SSLeay)
# it's a hack if you unset that
#$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
# The option is not omit to verify the certificate chain.
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
eval {
# required for new IO::Socket::SSL versions
require IO::Socket::SSL;
IO::Socket::SSL->import();
IO::Socket::SSL::set_ctx_defaults( SSL_verify_mode => 0 );
};
}
use base qw(centreon::script);