# HG changeset patch # User Sergey Kandaurov # Date 1620813055 -10800 # Node ID 0d1cec6881113e95f0db5a7f9a49027671cabb7c # Parent 55816c5fc86135bd1b112dd4ae3ec1cbdb200820 Tests: logging ssl variables with lingering close. diff --git a/ssl.t b/ssl.t --- a/ssl.t +++ b/ssl.t @@ -31,7 +31,7 @@ eval { IO::Socket::SSL::SSL_VERIFY_NONE( 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 @@ http { 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 @@ http { 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 @@ is(get_ssl_shutdown(8085), 1, 'ssl shutd } +$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 {