https://github.com/python/cpython/commit/af106b8f558e020fa4bbdd27577b4417354e41f1
commit: af106b8f558e020fa4bbdd27577b4417354e41f1
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-11-14T01:24:32+01:00
summary:

gh-161932: Skip test_ssl ECH test with FIPS enabled (#161939)

ECH hasn't been included in FIPS mode in OpenSSL so far.

files:
M Lib/test/test_ssl.py

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 19a9f98c316ab3..837445dc06d67b 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -40,6 +40,10 @@
     import ctypes
 except ImportError:
     ctypes = None
+try:
+    from _hashlib import get_fips_mode
+except ImportError:
+    def get_fips_mode(): return False
 
 
 ssl = import_helper.import_module("ssl")
@@ -2478,6 +2482,9 @@ def test_outer_alpn_does_not_replace_inner(self):
         self.assertEqual(server.selected_alpn_protocol(), 'h2')
 
     @unittest.skipUnless(ssl.HAS_ECH, 'requires ECH')
+    # At 2026-11-13 (OpenSSL 4.0.3 on Fedora 45), the test is incompatible
+    # with FIPS mode: https://github.com/openssl/openssl/issues/33724
+    @unittest.skipIf(get_fips_mode(), 'gh-161932: test incompatible with FIPS')
     def test_outer_alpn_without_ech_config(self):
         for options in (0, ssl.OP_ECH_GREASE):
             client_ctx, server_ctx, hostname = testing_context()
@@ -2491,6 +2498,9 @@ def test_outer_alpn_without_ech_config(self):
             self.assertEqual(server.selected_alpn_protocol(), 'h2')
 
     @unittest.skipUnless(ssl.HAS_ECH, 'requires ECH')
+    # At 2026-11-13 (OpenSSL 4.0.3 on Fedora 45), the test is incompatible
+    # with FIPS mode: https://github.com/openssl/openssl/issues/33724
+    @unittest.skipIf(get_fips_mode(), 'gh-161932: test incompatible with FIPS')
     def test_grease(self):
         client_ctx, server_ctx, hostname = testing_context()
         client_ctx.options |= ssl.OP_ECH_GREASE

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to