diff ssl_sni.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 5f53a1d6b83c
children dbce8fb5f5f8
line wrap: on
line diff
--- a/ssl_sni.t
+++ b/ssl_sni.t
@@ -46,6 +46,10 @@ http {
         location / {
             return 200 $server_name;
         }
+
+        location /protocol {
+            return 200 $ssl_protocol;
+        }
     }
 
     server {
@@ -144,6 +148,10 @@ my $ctx = new IO::Socket::SSL::SSL_Conte
 
 like(get('/', 'localhost', 8081, $ctx), qr/^\.:localhost$/m, 'ssl server name');
 
+SKIP: {
+skip 'no TLS 1.3 sessions', 1 if get('/protocol', 'localhost') =~ /TLSv1.3/
+	&& ($Net::SSLeay::VERSION < 1.88 || $IO::Socket::SSL::VERSION < 2.061);
+
 TODO: {
 local $TODO = 'not yet' if $t->has_module('OpenSSL (1.1.1|3)')
 	&& !$t->has_version('1.15.10');
@@ -153,6 +161,8 @@ like(get('/', 'localhost', 8081, $ctx), 
 
 }
 
+}
+
 ###############################################################################
 
 sub get_ssl_socket {