From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4016A1F461 for ; Mon, 1 Jul 2019 09:07:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/nntpd*.t: require IO::Socket::SSL 2.007 for Net::NNTP tests Date: Mon, 1 Jul 2019 09:07:38 +0000 Message-Id: <20190701090738.7468-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Net::NNTP won't attempt to use older versions of IO::Socket::SSL because 2.007 is the "first version with default CA on most platforms" according to comments in Net::NNTP. But then again we don't make remote requests when testing... --- t/nntpd-tls.t | 2 ++ t/nntpd.t | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/t/nntpd-tls.t b/t/nntpd-tls.t index 4cf53daa..49b31221 100644 --- a/t/nntpd-tls.t +++ b/t/nntpd-tls.t @@ -13,6 +13,8 @@ foreach my $mod (qw(DBD::SQLite IO::Socket::SSL Net::NNTP IO::Poll)) { } Net::NNTP->can('starttls') or plan skip_all => 'Net::NNTP does not support TLS'; +IO::Socket::SSL->VERSION(2.007) or + plan skip_all => 'IO::Socket::SSL <2.007 not supported by Net::NNTP'; my $cert = 'certs/server-cert.pem'; my $key = 'certs/server-key.pem'; diff --git a/t/nntpd.t b/t/nntpd.t index 1c5ae8d7..fdb4bee4 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -104,6 +104,10 @@ EOF SKIP: { $n->can('starttls') or skip('Net::NNTP too old to support STARTTLS', 2); + eval { + require IO::Socket::SSL; + IO::Socket::SSL->VERSION(2.007); + } or skip('IO::Socket::SSL <2.007 not supported by Net::NNTP'); ok(!$n->starttls, 'STARTTLS fails when unconfigured'); is($n->code, 580, 'got 580 code on server w/o TLS'); }; -- EW