fixed fips skip condition (#10264)

This commit is contained in:
Alex Gaynor 2024-01-26 10:14:39 -05:00 committed by GitHub
parent 430777fb56
commit f7888eb46e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"]))