1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00
aports/main/nginx/nginx-tests~io-socket-ssl-2.091-compat.patch
2025-06-30 03:44:45 +00:00

33 lines
1 KiB
Diff

From: Celeste <cielesti@protonmail.com>
Date: Thu, 26 Jun 2025 19:10:28 +0000
Subject: [PATCH] Fix tests with IO::Socket::SSL 2.091 and above
IO::Socket::SSL 2.091 changed the behavior of read() on half-closed SSL
connections, now `undef` is returned if you don't explicitly close it.
https://metacpan.org/release/SULLR/IO-Socket-SSL-2.091/source/Changes
--- a/stream_ssl_variables.t
+++ b/stream_ssl_variables.t
@@ -132,7 +132,7 @@
PeerAddr => '127.0.0.1:' . port(8444),
SSL => 1
);
-is($s->read(), '', 'ssl server name empty');
+is($s->read(), undef, 'ssl server name empty');
}
--- a/stream_ssl_verify_client.t
+++ b/stream_ssl_verify_client.t
@@ -111,8 +111,8 @@
is(stream('127.0.0.1:' . port(8080))->read(), ':', 'plain connection');
-is(get(8081), '', 'no cert');
-is(get(8082, '1.example.com'), '', 'bad optional cert');
+is(get(8081), undef, 'no cert');
+is(get(8082, '1.example.com'), undef, 'bad optional cert');
is(get(8082), 'NONE:', 'no optional cert');
like(get(8083, '1.example.com'), qr/FAILED.*BEGIN/, 'bad optional_no_ca cert');