diff ssl.t @ 1478:f9718a0773b9

Tests: skip TLS 1.3 session reuse tests with older Perl modules. SSL_reuse_ctx client support for TLS 1.3 (when negotiated) is only available in IO::Socket::SSL version 2.061 or later, Net::SSLeay version 1.88 or later.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 20 May 2019 20:25:05 +0300
parents eeababfd8726
children dbce8fb5f5f8
line wrap: on
line diff
--- a/ssl.t
+++ b/ssl.t
@@ -136,9 +136,14 @@ http {
         location / {
             return 200 "body $ssl_session_reused";
         }
+
         location /ciphers {
             return 200 "body $ssl_ciphers";
         }
+
+        location /protocol {
+            return 200 "body $ssl_protocol";
+        }
     }
 }
 
@@ -210,13 +215,18 @@ open STDERR, ">&", \*OLDERR;
 ###############################################################################
 
 like(get('/reuse', 8085), qr/^body \.$/m, 'shared initial session');
-like(get('/reuse', 8085), qr/^body r$/m, 'shared session reused');
+like(get('/', 8081), qr/^body \.$/m, 'builtin initial session');
+like(get('/', 8082), qr/^body \.$/m, 'builtin size initial session');
 
-like(get('/', 8081), qr/^body \.$/m, 'builtin initial session');
+SKIP: {
+skip 'no TLS 1.3 sessions', 3 if get('/protocol', 8084) =~ /TLSv1.3/
+	&& ($Net::SSLeay::VERSION < 1.88 || $IO::Socket::SSL::VERSION < 2.061);
+
+like(get('/reuse', 8085), qr/^body r$/m, 'shared session reused');
 like(get('/', 8081), qr/^body r$/m, 'builtin session reused');
+like(get('/', 8082), qr/^body r$/m, 'builtin size session reused');
 
-like(get('/', 8082), qr/^body \.$/m, 'builtin size initial session');
-like(get('/', 8082), qr/^body r$/m, 'builtin size session reused');
+}
 
 like(get('/', 8083), qr/^body \.$/m, 'reused none initial session');
 like(get('/', 8083), qr/^body \.$/m, 'session not reused 1');