comparison 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
comparison
equal deleted inserted replaced
1477:8b122b35703b 1478:f9718a0773b9
43 ssl_certificate_key localhost.key; 43 ssl_certificate_key localhost.key;
44 ssl_certificate localhost.crt; 44 ssl_certificate localhost.crt;
45 45
46 location / { 46 location / {
47 return 200 $server_name; 47 return 200 $server_name;
48 }
49
50 location /protocol {
51 return 200 $ssl_protocol;
48 } 52 }
49 } 53 }
50 54
51 server { 55 server {
52 listen 127.0.0.1:8080; 56 listen 127.0.0.1:8080;
142 SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(), 146 SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
143 SSL_session_cache_size => 100); 147 SSL_session_cache_size => 100);
144 148
145 like(get('/', 'localhost', 8081, $ctx), qr/^\.:localhost$/m, 'ssl server name'); 149 like(get('/', 'localhost', 8081, $ctx), qr/^\.:localhost$/m, 'ssl server name');
146 150
151 SKIP: {
152 skip 'no TLS 1.3 sessions', 1 if get('/protocol', 'localhost') =~ /TLSv1.3/
153 && ($Net::SSLeay::VERSION < 1.88 || $IO::Socket::SSL::VERSION < 2.061);
154
147 TODO: { 155 TODO: {
148 local $TODO = 'not yet' if $t->has_module('OpenSSL (1.1.1|3)') 156 local $TODO = 'not yet' if $t->has_module('OpenSSL (1.1.1|3)')
149 && !$t->has_version('1.15.10'); 157 && !$t->has_version('1.15.10');
150 158
151 like(get('/', 'localhost', 8081, $ctx), qr/^r:localhost$/m, 159 like(get('/', 'localhost', 8081, $ctx), qr/^r:localhost$/m,
152 'ssl server name - reused'); 160 'ssl server name - reused');
161
162 }
153 163
154 } 164 }
155 165
156 ############################################################################### 166 ###############################################################################
157 167