Skip to content

Commit

Permalink
verify_hostname is deprecated in later versions of LWP - this change …
Browse files Browse the repository at this point in the history
…allows verify_hostname to be disabled still
  • Loading branch information
bendechrai committed Feb 18, 2015
1 parent f24c16b commit cf8e1f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jvpn.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use warnings;
use Term::ReadKey;
use IO::Socket::INET;
use IO::Socket::SSL qw();
use Fcntl ':mode';
use Getopt::Long;
use HTTP::Request::Common;
Expand Down Expand Up @@ -111,6 +112,7 @@
my $ua = LWP::UserAgent->new;
# on RHEL6 ssl_opts is not exists
if(defined &LWP::UserAgent::ssl_opts) {
$ua->ssl_opts('SSL_verify_mode' => IO::Socket::SSL::SSL_VERIFY_NONE);
$ua->ssl_opts('verify_hostname' => $verifycert);
}
$ua->cookie_jar({});
Expand Down

0 comments on commit cf8e1f0

Please sign in to comment.