Mercurial > hg > nginx-tests
changeset 1132:3d312b6a1a19
Tests: avoid $ssl_session_reused tests failure with OpenSSL 1.1.0.
Closing a connection without close_notify worked by an accident,
until it was considered a bug and fixed in OpenSSL 1.1.0:
https://git.openssl.org/?p=openssl.git;h=e70656c
Note though that as of TLS 1.1, failure to properly close a connection
no longer requires that a session not be resumed.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 15 Feb 2017 23:59:44 +0300 |
parents | 7cce4d12579c |
children | 9edf2f99c58f |
files | ssl.t ssl_sni_sessions.t |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ssl.t +++ b/ssl.t @@ -253,7 +253,9 @@ like(cert('/time', 8085), qr/^body [:\s\ sub get { my ($uri, $port) = @_; my $s = get_ssl_socket($ctx, port($port)) or return; - http_get($uri, socket => $s); + my $r = http_get($uri, socket => $s); + $s->close(); + return $r; } sub cert {
--- a/ssl_sni_sessions.t +++ b/ssl_sni_sessions.t @@ -201,11 +201,15 @@ sub get_ssl_socket { sub get { my ($host, $port, $ctx) = @_; - return http(<<EOF, socket => get_ssl_socket($host, $port, $ctx)); + my $s = get_ssl_socket($host, $port, $ctx) or return; + my $r = http(<<EOF, socket => $s); GET / HTTP/1.0 Host: $host EOF + + $s->close(); + return $r; } ###############################################################################