From 5424e848b3315c2b57e6fc833f3fbde556707227 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 24 2020 10:21:13 +0000 Subject: Apply patch LWP-Protocol-https-6.06-Debian-746576-fix-test-make-it-workable-for-Crypt-SS.patch patch_name: LWP-Protocol-https-6.06-Debian-746576-fix-test-make-it-workable-for-Crypt-SS.patch present_in_specfile: true --- diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm index 65f3907..8ace7f2 100644 --- a/lib/LWP/Protocol/https.pm +++ b/lib/LWP/Protocol/https.pm @@ -21,7 +21,11 @@ sub _extra_sock_opts $ssl_opts{SSL_verifycn_scheme} = 'www'; } else { - $ssl_opts{SSL_verifycn_scheme} = 'none'; + if ( $Net::HTTPS::SSL_SOCKET_CLASS eq 'Net::SSL' ) { + $ssl_opts{SSL_verifycn_scheme} = ''; + } else { + $ssl_opts{SSL_verifycn_scheme} = 'none'; + } } if ($ssl_opts{SSL_verify_mode}) { unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) { diff --git a/t/https_proxy.t b/t/https_proxy.t index 5196960..c78345b 100644 --- a/t/https_proxy.t +++ b/t/https_proxy.t @@ -66,7 +66,10 @@ my %ua; $ua{noproxy} = LWP::UserAgent->new( keep_alive => 10, # size of connection cache # server does not know the expected name and returns generic certificate - ssl_opts => { verify_hostname => 0 } + ssl_opts => { + verify_hostname => 0, + SSL_ca_file => $cafile, + } ); $ua{proxy} = LWP::UserAgent->new(