Fixing SSL_verify_mode deprecated warning.

Fixing SSL_verify_mode deprecated warning:
*******************************************************************
 Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
 is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
 together with SSL_ca_file|SSL_ca_path for verification.
 If you really don't want to verify the certificate and keep the
 connection open to Man-In-The-Middle attacks please set
 SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
This commit is contained in:
Nicolas Di Gregorio 2018-02-21 08:01:16 +01:00 committed by GitHub
parent 94dc35984f
commit 70833d3ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2037,6 +2037,8 @@ sub geturl {
Proto => 'tcp',
MultiHomed => 1,
Timeout => opt('timeout'),
SSL_verify_mode => 'SSL_VERIFY_PEER',
SSL_ca_path => '/etc/pki/tls/certs/',
);
defined $sd or warning("cannot connect to $peer:$port socket: $@ " . IO::Socket::SSL::errstr());
} elsif ($globals{'ipv6'}) {