comparison 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
comparison
equal deleted inserted replaced
1477:8b122b35703b 1478:f9718a0773b9
134 ssl_session_cache off; 134 ssl_session_cache off;
135 135
136 location / { 136 location / {
137 return 200 "body $ssl_session_reused"; 137 return 200 "body $ssl_session_reused";
138 } 138 }
139
139 location /ciphers { 140 location /ciphers {
140 return 200 "body $ssl_ciphers"; 141 return 200 "body $ssl_ciphers";
142 }
143
144 location /protocol {
145 return 200 "body $ssl_protocol";
141 } 146 }
142 } 147 }
143 } 148 }
144 149
145 EOF 150 EOF
208 open STDERR, ">&", \*OLDERR; 213 open STDERR, ">&", \*OLDERR;
209 214
210 ############################################################################### 215 ###############################################################################
211 216
212 like(get('/reuse', 8085), qr/^body \.$/m, 'shared initial session'); 217 like(get('/reuse', 8085), qr/^body \.$/m, 'shared initial session');
218 like(get('/', 8081), qr/^body \.$/m, 'builtin initial session');
219 like(get('/', 8082), qr/^body \.$/m, 'builtin size initial session');
220
221 SKIP: {
222 skip 'no TLS 1.3 sessions', 3 if get('/protocol', 8084) =~ /TLSv1.3/
223 && ($Net::SSLeay::VERSION < 1.88 || $IO::Socket::SSL::VERSION < 2.061);
224
213 like(get('/reuse', 8085), qr/^body r$/m, 'shared session reused'); 225 like(get('/reuse', 8085), qr/^body r$/m, 'shared session reused');
214
215 like(get('/', 8081), qr/^body \.$/m, 'builtin initial session');
216 like(get('/', 8081), qr/^body r$/m, 'builtin session reused'); 226 like(get('/', 8081), qr/^body r$/m, 'builtin session reused');
217
218 like(get('/', 8082), qr/^body \.$/m, 'builtin size initial session');
219 like(get('/', 8082), qr/^body r$/m, 'builtin size session reused'); 227 like(get('/', 8082), qr/^body r$/m, 'builtin size session reused');
228
229 }
220 230
221 like(get('/', 8083), qr/^body \.$/m, 'reused none initial session'); 231 like(get('/', 8083), qr/^body \.$/m, 'reused none initial session');
222 like(get('/', 8083), qr/^body \.$/m, 'session not reused 1'); 232 like(get('/', 8083), qr/^body \.$/m, 'session not reused 1');
223 233
224 like(get('/', 8084), qr/^body \.$/m, 'reused off initial session'); 234 like(get('/', 8084), qr/^body \.$/m, 'reused off initial session');