Mercurial > hg > nginx-tests
changeset 1093:2b0ef67ab032
Tests: added test for $ssl_ciphers variable (ticket #870).
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Mon, 12 Dec 2016 15:53:27 +0300 |
parents | f72f43eda2a6 |
children | dd8f126afa32 |
files | ssl.t |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ssl.t Mon Dec 12 15:45:49 2016 +0300 +++ b/ssl.t Mon Dec 12 15:53:27 2016 +0300 @@ -66,6 +66,9 @@ location /cipher { return 200 "body $ssl_cipher"; } + location /ciphers { + return 200 "body $ssl_ciphers"; + } location /client_verify { return 200 "body $ssl_client_verify"; } @@ -190,7 +193,7 @@ SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(), SSL_session_cache_size => 100); -$t->try_run('no ssl_client_s_dn_legacy')->plan(20); +$t->try_run('no ssl_ciphers')->plan(21); ############################################################################### @@ -232,6 +235,10 @@ like(get('/id', 8085), qr/^body \w{64}$/m, 'session id'); unlike(http_get('/id'), qr/body \w/, 'session id no ssl'); like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher'); + +$s = get_ssl_socket(undef, 8085); +like(http_get('/ciphers', socket => $s), qr/^body [:\w-]+$/m, 'ciphers'); + like(get('/client_verify', 8085), qr/^body NONE$/m, 'client verify'); like(get('/protocol', 8085), qr/^body (TLS|SSL)v(\d|\.)+$/m, 'protocol'); like(cert('/issuer', 8085), qr!^body CN=issuer:/CN=issuer$!m, 'issuer');