Mercurial > hg > nginx-tests
changeset 1844:6705a3760f48
Tests: fixed stream_proxy_ssl.t with LibreSSL and TLSv1.3.
LibreSSL does not support session reuse with TLSv1.3.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Mar 2023 19:50:21 +0300 |
parents | 818e6d8c43b5 |
children | 65b1dd07c0e4 |
files | stream_proxy_ssl.t |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream_proxy_ssl.t Thu Mar 23 19:50:19 2023 +0300 +++ b/stream_proxy_ssl.t Thu Mar 23 19:50:21 2023 +0300 @@ -78,6 +78,8 @@ ssl_certificate_key localhost.key; ssl_certificate localhost.crt; + + add_header X-Protocol $ssl_protocol; } } @@ -111,9 +113,16 @@ is(stream('127.0.0.1:' . port(8081))->read(), '.', 'ssl 2'); is(stream('127.0.0.1:' . port(8082))->read(), '.', 'ssl session new'); + +TODO: { +local $TODO = 'no TLSv1.3 sessions in LibreSSL' + if $t->has_module('LibreSSL') && test_tls13(); + is(stream('127.0.0.1:' . port(8082))->read(), 'r', 'ssl session reused'); is(stream('127.0.0.1:' . port(8082))->read(), 'r', 'ssl session reused 2'); +} + my $s = http('', start => 1); sleep 3; @@ -121,3 +130,9 @@ like(http_get('/', socket => $s), qr/200 OK/, 'proxy connect timeout'); ############################################################################### + +sub test_tls13 { + http_get('/') =~ /TLSv1.3/; +} + +###############################################################################