[PATCH 11 of 20] Tests: fixed proxy_ssl.t with LibreSSL and TLSv1.3

Maxim Dounin mdounin at mdounin.ru
Sat Mar 18 14:15:06 UTC 2023


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1679148613 -10800
#      Sat Mar 18 17:10:13 2023 +0300
# Node ID 7dec25ecd3db606258647bd2ce2bca15e793accb
# Parent  79177a6c535839517137dd7e3c7e7d57a5aa35dd
Tests: fixed proxy_ssl.t with LibreSSL and TLSv1.3.

LibreSSL does not support session reuse with TLSv1.3.

diff --git a/proxy_ssl.t b/proxy_ssl.t
--- a/proxy_ssl.t
+++ b/proxy_ssl.t
@@ -46,6 +46,7 @@ http {
 
         location / {
             add_header X-Session $ssl_session_reused;
+            add_header X-Protocol $ssl_protocol;
         }
     }
 
@@ -109,9 +110,16 @@ foreach my $name ('localhost') {
 like(http_get('/ssl'), qr/200 OK.*X-Session: \./s, 'ssl');
 like(http_get('/ssl'), qr/200 OK.*X-Session: \./s, 'ssl 2');
 like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: \./s, 'ssl session new');
+
+TODO: {
+local $TODO = 'no TLS 1.3 sessions in LibreSSL'
+	if $t->has_module('LibreSSL') && http_get('/ssl') =~ /TLSv1.3/;
+
 like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused');
 like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused 2');
 
+}
+
 SKIP: {
 skip 'long test', 1 unless $ENV{TEST_NGINX_UNSAFE};
 


More information about the nginx-devel mailing list