Skip to content

Commit

Permalink
ec.generate_private_key() is supposed to be given a curve instance. (#…
Browse files Browse the repository at this point in the history
…455)

In this one place we gave a class instead, which Cryptography < 42.0.0
tolerates and fixes, but it will be deprecated in 42.0.0.
  • Loading branch information
rthalley authored Jan 16, 2024
1 parent 3cdecdd commit 5bbac3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_certificate(*, alternative_names, common_name, hash_algorithm, key)


def generate_ec_certificate(common_name, alternative_names=[], curve=ec.SECP256R1):
key = ec.generate_private_key(curve=curve)
key = ec.generate_private_key(curve=curve())
return generate_certificate(
alternative_names=alternative_names,
common_name=common_name,
Expand Down

0 comments on commit 5bbac3b

Please sign in to comment.