changeset 1743:2318ed01ce53

Tests: skip ALPN rejection tests with too old LibreSSL.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 21 Oct 2021 20:18:01 +0300
parents 7bfa47410cc0
children 38bd7e75fe69
files h2_ssl.t mail_ssl.t stream_ssl_alpn.t
diffstat 3 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/h2_ssl.t
+++ b/h2_ssl.t
@@ -93,6 +93,10 @@ plan(skip_all => 'no ALPN negotiation') 
 
 ###############################################################################
 
+SKIP: {
+$t->{_configure_args} =~ /LibreSSL ([\d\.]+)/;
+skip 'LibreSSL too old', 1 if defined $1 and $1 lt '3.4.0';
+
 TODO: {
 local $TODO = 'not yet' unless $t->has_version('1.21.4');
 
@@ -100,6 +104,8 @@ ok(!get_ssl_socket(['unknown']), 'alpn r
 
 }
 
+}
+
 like(http_get('/', socket => get_ssl_socket(['http/1.1'])),
 	qr/200 OK/, 'alpn to HTTP/1.1 fallback');
 
--- a/mail_ssl.t
+++ b/mail_ssl.t
@@ -217,6 +217,10 @@ like(Net::SSLeay::dump_peer_certificate(
 
 ok(get_ssl_socket(8148, undef, ['imap']), 'alpn');
 
+SKIP: {
+$t->{_configure_args} =~ /LibreSSL ([\d\.]+)/;
+skip 'LibreSSL too old', 1 if defined $1 and $1 lt '3.4.0';
+
 TODO: {
 local $TODO = 'not yet' unless $t->has_version('1.21.4');
 
@@ -224,6 +228,8 @@ ok(!get_ssl_socket(8148, undef, ['unknow
 
 }
 
+}
+
 # starttls imap
 
 $s = Test::Nginx::IMAP->new(PeerAddr => '127.0.0.1:' . port(8149));
--- a/stream_ssl_alpn.t
+++ b/stream_ssl_alpn.t
@@ -86,12 +86,19 @@ is(get_ssl('first'), 'X first X', 'alpn 
 is(get_ssl('wrong', 'first'), 'X first X', 'alpn many');
 is(get_ssl('wrong', 'second'), 'X second X', 'alpn second');
 is(get_ssl(), 'X  X', 'no alpn');
+
+SKIP: {
+$t->{_configure_args} =~ /LibreSSL ([\d\.]+)/;
+skip 'LibreSSL too old', 2 if defined $1 and $1 lt '3.4.0';
+
 ok(!get_ssl('wrong'), 'alpn mismatch');
 
 $t->stop();
 
 like($t->read_file('test.log'), qr/500$/, 'alpn mismatch - log');
 
+}
+
 ###############################################################################
 
 sub get_ssl {