Subject: | [PATCH] SSL_test.t fails with IO::Socket::SSL 1.950 and above |
The default for certificate verification for clients has changed from SSL_VERIFY_NONE to SSL_VERIFY_PEER in IO::Socket::SSL 1.950 and above, which breaks SSL_test.t:
$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Options.t ............... ok
t/Port_Configuration.t .... ok
t/Server_BASE.t ........... ok
t/Server_Fork.t ........... ok
t/Server_http.t ........... ok
t/Server_INET.t ........... ok
t/Server_Multiplex.t ...... ok
t/Server_MultiType.t ...... ok
t/Server_PreFork.t ........ ok
t/Server_PreForkSimple.t .. ok
t/Server_Single.t ......... ok
t/SSL_test.t ..............
Failed 1/5 subtests
t/SSLEAY_test.t ........... ok
t/UDP_test.t .............. ok
t/UNIX_test.t ............. ok
Test Summary Report
-------------------
t/SSL_test.t (Wstat: 9 Tests: 5 Failed: 1)
Failed test: 5
Non-zero wait status: 9
Files=15, Tests=185, 2 wallclock secs ( 0.07 usr 0.02 sys + 0.94 cusr 0.13 csys = 1.16 CPU)
Result: FAIL
Failed 1/15 test programs. 1/185 subtests failed.
make: *** [test_dynamic] Error 255
Explicitly setting SSL_verify_mode to SSL_VERIFY_NONE as per the attached patch fixes this test suite issue.
Subject: | Net-Server-2.007-cert-verify.patch |
Since 1.950, IO::Socket::SSL->SSL_verify_mode default changed
from SSL_VERIFY_NONE to SSL_VERIFY_PEER, which breaks this test.
IO::Socket::SSL version 1.31 or later is needed for the
SSL_VERIFY_NONE constant.
--- t/SSL_test.t
+++ t/SSL_test.t
@@ -53,6 +53,7 @@
use_ok qw(Net::Server::Proto::SSL) or exit;
require Net::Server;
+use IO::Socket::SSL 1.31;
@Net::Server::Test::ISA = qw(Net::Server);
sub accept {
@@ -76,6 +77,7 @@
my $remote = IO::Socket::SSL->new(
PeerAddr => $env->{'hostname'},
PeerPort => $env->{'ports'}->[0],
+ SSL_verify_mode => SSL_VERIFY_NONE,
) || die "Couldn't open child to sock: $!";
my $line = <$remote>;