# HG changeset patch # User Sergey Kandaurov # Date 1634836681 -10800 # Node ID 2318ed01ce539d05aa13e7abeae1af2d7d2b2c31 # Parent 7bfa47410cc0ee01bab9081850db1d7902dd86ef Tests: skip ALPN rejection tests with too old LibreSSL. diff --git a/h2_ssl.t b/h2_ssl.t --- 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'); diff --git a/mail_ssl.t b/mail_ssl.t --- 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)); diff --git a/stream_ssl_alpn.t b/stream_ssl_alpn.t --- 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 {