From 533a3c909d59698259456233041a3d4e232bf87e Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 19 Nov 2016 09:49:10 +0800 Subject: =?UTF-8?q?change=20derive=5Felliptic=5Fcurve=5Fpublic=5Fpoint=20t?= =?UTF-8?q?o=20return=20EllipticCurvePubl=E2=80=A6=20(#3243)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * change derive_elliptic_curve_public_point to return EllipticCurvePublicKey * also rename the backend interface method * review feedback * Rename to derive_elliptic_curve_private_key * Returns EllipticCurvePrivateKey * Reuses the EC_POINT in the openssl impl * Rename "secret" arg to "private_value" which is consistent with our naming for the value in ECPrivateNumbers. --- tests/hazmat/backends/test_multibackend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py index 7ffc4236..ea08e17b 100644 --- a/tests/hazmat/backends/test_multibackend.py +++ b/tests/hazmat/backends/test_multibackend.py @@ -185,7 +185,7 @@ class DummyEllipticCurveBackend(object): self.elliptic_curve_supported(curve) ) - def derive_elliptic_curve_public_point(self, private_value, curve): + def derive_elliptic_curve_private_key(self, private_value, curve): if not self.elliptic_curve_supported(curve): raise UnsupportedAlgorithm(_Reasons.UNSUPPORTED_ELLIPTIC_CURVE) @@ -515,9 +515,9 @@ class TestMultiBackend(object): ) with pytest.raises(UnsupportedAlgorithm): - backend.derive_elliptic_curve_public_point(123, DummyCurve()) + backend.derive_elliptic_curve_private_key(123, DummyCurve()) - assert backend.derive_elliptic_curve_public_point( + assert backend.derive_elliptic_curve_private_key( 123, ec.SECT283K1()) is None def test_pem_serialization_backend(self): -- cgit v1.2.3