# HG changeset patch # User Andrey Zelenkov # Date 1481547207 -10800 # Node ID 2b0ef67ab0329b4f120df9c1532850831cac859e # Parent f72f43eda2a6e51ac75fc9a912d93d2c2d44f68e Tests: added test for $ssl_ciphers variable (ticket #870). diff --git a/ssl.t b/ssl.t --- a/ssl.t +++ b/ssl.t @@ -66,6 +66,9 @@ http { 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 @@ my $ctx = new IO::Socket::SSL::SSL_Conte 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('/', 8081), qr/^body \.$/m, 'se 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');