Mercurial > hg > nginx-tests
changeset 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 | 930df2f91aec |
children | 1baf5fe1d86c |
files | h2_http2.t |
diffstat | 1 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/h2_http2.t Thu Jun 08 15:16:22 2023 +0400 +++ b/h2_http2.t Thu Jun 08 16:41:11 2023 +0400 @@ -115,16 +115,43 @@ # 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');