# HG changeset patch # User Sergey Kandaurov # Date 1628672151 -10800 # Node ID 3581dc3c1937919dea41a9fc5542b87069982fe3 # Parent 122002b1941616456acc3fa3c0c4550b963b192e Tests: added ssl test for "unexpected eof while reading". See for details: http://mailman.nginx.org/pipermail/nginx/2020-March/059162.html 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(26); + ->has_daemon('openssl')->plan(28); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -316,6 +316,10 @@ EOF my $r = http($req, socket => $s) || ""; is(() = $r =~ /(200 OK)/g, 1000, 'pipelined requests'); +# OpenSSL 3.0 error "unexpected eof while reading" seen as a critical error + +ok(get_ssl_socket(8085), 'ssl unexpected eof'); + # close_notify is sent before lingering close is(get_ssl_shutdown(8085), 1, 'ssl shutdown on lingering close'); @@ -331,6 +335,8 @@ like($t->read_file('ssl.log'), qr/^(TLS| } +like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit'); + ############################################################################### sub get {