Skip to content

Commit

Permalink
fixed fips skip condition (#10264)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Jan 26, 2024
1 parent 430777f commit f7888eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/hazmat/primitives/test_dh.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,7 @@ def test_large_key_generate_dh(self, backend):
)
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"]))
Expand Down

0 comments on commit f7888eb

Please sign in to comment.