mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-07 20:35:27 +02:00
+ Better way to manage the two ssl backend for lwp
This commit is contained in:
parent
323e843460
commit
4d076a4bb0
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user