Subject: | LWP::Protocol::https discards 0 value for SSL_VERIFY_mode |
Date: | Thu, 28 Jan 2016 16:52:46 +0000 |
To: | bug-LWP-Protocol-https [...] rt.cpan.org |
From: | Errietta Kostala <errietta [...] errietta.me> |
Hello,
If you want to disable ssl cert verification, you need to use
SSL_VERIFY_NONE, which resolves to 0. LWP::Protocol::https transforms this
value to 1:
$ssl_opts{SSL_verify_mode} ||= 1;
Patch:
--- https_old.pm 2016-01-28 16:51:38.970331004 +0000
+++ https.pm 2016-01-28 16:42:22.410331004 +0000
@@ -17,7 +17,8 @@
my $self = shift;
my %ssl_opts = %{$self->{ua}{ssl_opts} || {}};
if (delete $ssl_opts{verify_hostname}) {
- $ssl_opts{SSL_verify_mode} ||= 1;
+ $ssl_opts{SSL_verify_mode} = defined $ssl_opts{SSL_verify_mode} ?
$ssl_opts{SSL_verify_mode} : 1;
+
$ssl_opts{SSL_verifycn_scheme} = 'www';
}
else {
--
Errietta Kostala
<errietta@errietta.me>