From 4f984a2fdb3815361f83013c23af0ff5d6d63d67 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 5 Nov 2019 12:13:46 +0100 Subject: Fixed bug #78775 Clear the OpenSSL error queue before performing SSL stream operations. As we don't control all code that could possibly be using OpenSSL, we can't rely on the error queue being empty. --- ext/curl/tests/bug78775.phpt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ext/curl/tests/bug78775.phpt (limited to 'ext/curl/tests') diff --git a/ext/curl/tests/bug78775.phpt b/ext/curl/tests/bug78775.phpt new file mode 100644 index 0000000000..490c168166 --- /dev/null +++ b/ext/curl/tests/bug78775.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #78775: TLS issues from HTTP request affecting other encrypted connections +--SKIPIF-- + +--FILE-- + true, + CURLOPT_SSL_VERIFYPEER => true, + ] +); + +var_dump(curl_exec($handle)); +curl_close($handle); + +fwrite($sock, "GET / HTTP/1.0\n\n"); +var_dump(fread($sock, 8)); + +?> +--EXPECTF-- +resource(%d) of type (stream) +bool(false) +string(8) "HTTP/1.0" -- cgit v1.2.1