From 91f784d6fd911c0b8fc91645a9ba61ded0a8abb4 Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Fri, 21 Aug 2026 00:04:50 +0200 Subject: [PATCH] [test] Fix handshake error matching for OpenSSL 4.x (#17491) Closes #17490 Authored by: mikelolasagasti --- test/test_networking.py | 2 +- test/test_websockets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_networking.py b/test/test_networking.py index 9dbe263b6f..7c5aa4bb56 100644 --- a/test/test_networking.py +++ b/test/test_networking.py @@ -338,7 +338,7 @@ class TestHTTPRequestHandler(TestRequestHandlerBase): https_server_thread.start() with handler(verify=False) as rh: - with pytest.raises(SSLError, match=r'(?i)ssl(?:v3|/tls).alert.handshake.failure') as exc_info: + with pytest.raises(SSLError, match=r'(?i)(?:sslv3|tls).alert.handshake.failure') as exc_info: validate_and_send(rh, Request(f'https://127.0.0.1:{https_port}/headers')) assert not issubclass(exc_info.type, CertificateVerifyError) diff --git a/test/test_websockets.py b/test/test_websockets.py index caa026f44f..2b8488625d 100644 --- a/test/test_websockets.py +++ b/test/test_websockets.py @@ -186,7 +186,7 @@ class TestWebsSocketRequestHandlerConformance: def test_ssl_error(self, handler): with handler(verify=False) as rh: - with pytest.raises(SSLError, match=r'ssl(?:v3|/tls) alert handshake failure') as exc_info: + with pytest.raises(SSLError, match=r'(?:sslv3|tls) alert handshake failure') as exc_info: ws_validate_and_send(rh, Request(self.bad_wss_host)) assert not issubclass(exc_info.type, CertificateVerifyError)