t/nntpd-tls.t | 2 ++ t/nntpd.t | 4 ++++ diff --git a/t/nntpd-tls.t b/t/nntpd-tls.t index 4cf53daad8cd0325fdb7e9555ab56bc7a19906d4..49b31221f02c6cf0ec19af788010c864ba857984 100644 --- a/t/nntpd-tls.t +++ b/t/nntpd-tls.t @@ -13,6 +13,8 @@ plan skip_all => "$mod missing for $0" if $@; } 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 1c5ae8d7a5beaf0858620b7fc4d09655ba8b6624..fdb4bee42b639554d4c093ecb6a374c880d053fa 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -104,6 +104,10 @@ 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'); };