# HG changeset patch # User Sergey Kandaurov # Date 1686228071 -14400 # Node ID 034c9121b9d1c5b5068aa107ce63803880dbfeed # Parent 930df2f91aec68268ed2bf82bfcb07e8c001533c 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. diff --git a/h2_http2.t b/h2_http2.t --- 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');