# HG changeset patch # User Sergey Kandaurov # Date 1620813055 -10800 # Node ID 0d1cec6881113e95f0db5a7f9a49027671cabb7c # Parent 55816c5fc86135bd1b112dd4ae3ec1cbdb200820 Tests: logging ssl variables with lingering close. diff -r 55816c5fc861 -r 0d1cec688111 ssl.t --- a/ssl.t Thu May 06 13:52:37 2021 +0300 +++ b/ssl.t Wed May 12 12:50:55 2021 +0300 @@ -31,7 +31,7 @@ plan(skip_all => 'IO::Socket::SSL too old') if $@; my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite proxy/) - ->has_daemon('openssl')->plan(25); + ->has_daemon('openssl')->plan(26); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -49,6 +49,8 @@ ssl_certificate localhost.crt; ssl_session_tickets off; + log_format ssl $ssl_protocol; + server { listen 127.0.0.1:8085 ssl; listen 127.0.0.1:8080; @@ -92,6 +94,8 @@ location /body { add_header X-Body $request_body always; proxy_pass http://127.0.0.1:8080/; + + access_log %%TESTDIR%%/ssl.log ssl; } } @@ -321,6 +325,16 @@ } +$t->stop(); + +TODO: { +local $TODO = 'not yet' if $t->has_version('1.19.5'); + +like($t->read_file('ssl.log'), qr/^(TLS|SSL)v(\d|\.)+$/m, + 'log ssl variable on lingering close'); + +} + ############################################################################### sub get {