0

no ssl verification in debug mode

This commit is contained in:
Kaimi
2016-03-03 11:41:25 +03:00
parent 7debe18b80
commit 9b1f3679f4

View File

@@ -213,7 +213,12 @@ my $ua = LWP::UserAgent->new
( (
agent => $opt{mobile} ? MOBILE_AGENT : AGENT, agent => $opt{mobile} ? MOBILE_AGENT : AGENT,
cookie_jar => new HTTP::Cookies, cookie_jar => new HTTP::Cookies,
timeout => TIMEOUT timeout => TIMEOUT,
ssl_opts =>
{
verify_hostname => $opt{debug} ? 0 : 1,
SSL_verify_mode => $opt{debug} ? IO::Socket::SSL->SSL_VERIFY_NONE : IO::Socket::SSL->SSL_VERIFY_PEER,
}
); );
my $json_decoder = JSON::PP->new->utf8->pretty->allow_nonref->allow_singlequote; my $json_decoder = JSON::PP->new->utf8->pretty->allow_nonref->allow_singlequote;
my @exclude = (); my @exclude = ();