From 5bbac3bfa69125682b8837e9c358694bfe038656 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Mon, 15 Jan 2024 16:54:41 -0800 Subject: [PATCH] ec.generate_private_key() is supposed to be given a curve instance. (#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. --- tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index c99e267f9..6784715b9 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -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,