aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2024-01-26 10:14:39 -0500
committerGitHub <noreply@github.com>2024-01-26 07:14:39 -0800
commitf7888eb46e9753d65fa2d4f3c24838bee8aad814 (patch)
tree74ca1e0f776c8e66d9b54dfcfe029282be2d2a94 /tests
parent430777fb56f444932c748c9c94dc0cc9e2a260d2 (diff)
downloadpyca-cryptography-f7888eb46e9753d65fa2d4f3c24838bee8aad814.zip
pyca-cryptography-f7888eb46e9753d65fa2d4f3c24838bee8aad814.tar.gz
pyca-cryptography-f7888eb46e9753d65fa2d4f3c24838bee8aad814.tar.bz2
fixed fips skip condition (#10264)
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/test_dh.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_dh.py b/tests/hazmat/primitives/test_dh.py
index 9caded2..4b3b63a 100644
--- a/tests/hazmat/primitives/test_dh.py
+++ b/tests/hazmat/primitives/test_dh.py
@@ -164,10 +164,7 @@ class TestDH:
)
def test_dh_parameters_allows_rfc3526_groups(self, backend, vector):
p = int.from_bytes(binascii.unhexlify(vector["p"]), "big")
- if (
- backend._fips_enabled
- and p.bit_length() < backend._fips_dh_min_modulus
- ):
+ if backend._fips_enabled and p < backend._fips_dh_min_modulus:
pytest.skip("modulus too small for FIPS mode")
params = dh.DHParameterNumbers(p, int(vector["g"]))