diff h2_http2.t @ 1907:034c9121b9d1

Tests: added h2_http2.t TODOs for LibreSSL and older OpenSSL. Those libraries provide an older callback order, where ALPN callback is invoked before SNI callback. Additionally, OpenSSL 1.0.2 doesn't send alert on ALPN mismatch.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 08 Jun 2023 16:41:11 +0400
parents c560f5da581e
children 79ca9ab75310
line wrap: on
line diff
--- a/h2_http2.t
+++ b/h2_http2.t
@@ -115,16 +115,43 @@ foreach my $name ('localhost') {
 # make sure HTTP/2 can be disabled selectively on virtual servers
 
 ok(get_ssl_socket(8443), 'default to enabled');
+
+TODO: {
+local $TODO = 'broken ALPN/SNI order in LibreSSL'
+	if $t->has_module('LibreSSL');
+local $TODO = 'OpenSSL too old'
+	if $t->has_module('OpenSSL')
+	and not $t->has_feature('openssl:1.1.0');
+
 ok(!get_ssl_socket(8443, 'disabled'), 'sni to disabled');
 
+}
+
 is(get_https(8443, 'http2'), 200, 'host to enabled');
 is(get_https(8443, 'disabled', 'http2'), 421, 'host to disabled');
 
 # make sure HTTP/2 can be enabled selectively on virtual servers
 
+TODO: {
+local $TODO = 'OpenSSL too old'
+	if $t->has_module('OpenSSL')
+	and not $t->has_feature('openssl:1.1.0');
+
 ok(!get_ssl_socket(8444), 'default to disabled');
+
+}
+
+TODO: {
+local $TODO = 'broken ALPN/SNI order in LibreSSL'
+	if $t->has_module('LibreSSL');
+local $TODO = 'OpenSSL too old'
+	if $t->has_module('OpenSSL')
+	and not $t->has_feature('openssl:1.1.0');
+
 is(get_https(8444, 'http2'), 200, 'sni to enabled');
 
+}
+
 # http2 detection on plain tcp socket by connection preface
 
 like(http_get('/'), qr/200 OK/, 'non-ssl http');