我正在尝试创建与ssl
没有证书且需要绕过代理的内部站点的客户端连接。
我能够绕过代理,并且能够连接到站点并创建客户端连接,但是,我收到了这个丑陋的警告:
******************************************************************* 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. *******************************************************************
在C:/strawberry/perl/site/lib/LWP/Protocol/http.pm line 31
我的代码:
use RPC::XML::Client;
use XML::Simple;
use LWP::Protocol::https;
$ENV{NO_PROXY} = '10.*';
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
my $server = RPC::XML::Client->new("$vneUrl/api/index.ice",
ssl_opts => { SSL_verify_mode => 'SSL_VERIFY_NONE',
verify_hostname => 0,
SSL_use_cert => 0x00
},
);