Skip to content

Commit 220f043

Browse files
committed
fix test_ssl.ContextTests.test_set_groups on FIPS builds
1 parent 001461a commit 220f043

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,9 @@ def test_get_ciphers(self):
964964

965965
def test_set_groups(self):
966966
ctx = ssl.create_default_context()
967-
self.assertIsNone(ctx.set_groups('P-256:X25519'))
967+
# Use '?' for X25519 as the latter is not allowed if
968+
# OpenSSL has been built with FIPS module support.
969+
self.assertIsNone(ctx.set_groups('P-256:?X25519'))
968970
self.assertRaises(ssl.SSLError, ctx.set_groups, 'P-256:xxx')
969971

970972
@unittest.skipUnless(CAN_GET_AVAILABLE_OPENSSL_GROUPS,

0 commit comments

Comments
 (0)