# HG changeset patch # User Sergey Kandaurov # Date 1487192384 -10800 # Node ID 3d312b6a1a19b82884a03aa1e7d68cefd31efcf9 # Parent 7cce4d12579c4d5a1d5d188fa6efd7fcbfba4ff3 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. diff --git a/ssl.t b/ssl.t --- 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 { diff --git a/ssl_sni_sessions.t b/ssl_sni_sessions.t --- 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(< get_ssl_socket($host, $port, $ctx)); + my $s = get_ssl_socket($host, $port, $ctx) or return; + my $r = http(< $s); GET / HTTP/1.0 Host: $host EOF + + $s->close(); + return $r; } ###############################################################################