comparison ssl.t @ 1384:965bddf88b8f

Tests: disabled session cache for $ssl_ciphers tests. With older OpenSSL versions, the variable is available only for new sessions.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 10 Oct 2018 13:24:45 +0300
parents cb1346b553aa
children de181159f279
comparison
equal deleted inserted replaced
1383:e5246e5caa31 1384:965bddf88b8f
66 return 200 "body $ssl_session_id"; 66 return 200 "body $ssl_session_id";
67 } 67 }
68 location /cipher { 68 location /cipher {
69 return 200 "body $ssl_cipher"; 69 return 200 "body $ssl_cipher";
70 } 70 }
71 location /ciphers {
72 return 200 "body $ssl_ciphers";
73 }
74 location /client_verify { 71 location /client_verify {
75 return 200 "body $ssl_client_verify"; 72 return 200 "body $ssl_client_verify";
76 } 73 }
77 location /protocol { 74 location /protocol {
78 return 200 "body $ssl_protocol"; 75 return 200 "body $ssl_protocol";
136 133
137 ssl_session_cache off; 134 ssl_session_cache off;
138 135
139 location / { 136 location / {
140 return 200 "body $ssl_session_reused"; 137 return 200 "body $ssl_session_reused";
138 }
139 location /ciphers {
140 return 200 "body $ssl_ciphers";
141 } 141 }
142 } 142 }
143 } 143 }
144 144
145 EOF 145 EOF
245 # embedded variables 245 # embedded variables
246 246
247 like(get('/id', 8085), qr/^body \w{64}$/m, 'session id'); 247 like(get('/id', 8085), qr/^body \w{64}$/m, 'session id');
248 unlike(http_get('/id'), qr/body \w/, 'session id no ssl'); 248 unlike(http_get('/id'), qr/body \w/, 'session id no ssl');
249 like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher'); 249 like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher');
250 like(get('/ciphers', 8085), qr/^body [:\w-]+$/m, 'ciphers'); 250 like(get('/ciphers', 8084), qr/^body [:\w-]+$/m, 'ciphers');
251 like(get('/client_verify', 8085), qr/^body NONE$/m, 'client verify'); 251 like(get('/client_verify', 8085), qr/^body NONE$/m, 'client verify');
252 like(get('/protocol', 8085), qr/^body (TLS|SSL)v(\d|\.)+$/m, 'protocol'); 252 like(get('/protocol', 8085), qr/^body (TLS|SSL)v(\d|\.)+$/m, 'protocol');
253 like(cert('/issuer', 8085), qr!^body CN=issuer:/CN=issuer$!m, 'issuer'); 253 like(cert('/issuer', 8085), qr!^body CN=issuer:/CN=issuer$!m, 'issuer');
254 like(cert('/subject', 8085), qr!^body CN=subject:/CN=subject$!m, 'subject'); 254 like(cert('/subject', 8085), qr!^body CN=subject:/CN=subject$!m, 'subject');
255 like(cert('/time', 8085), qr/^body [:\s\w]+![:\s\w]+![23]$/m, 'time'); 255 like(cert('/time', 8085), qr/^body [:\s\w]+![:\s\w]+![23]$/m, 'time');