aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2016-11-19 09:49:10 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2016-11-18 20:49:10 -0500
commit533a3c909d59698259456233041a3d4e232bf87e (patch)
treea6b443972c93af54ac4cba0e04705243fc4feb00 /tests/hazmat
parente929c3c613d5ba5bd8f0c6ba08563a211ef70601 (diff)
downloadcryptography-533a3c909d59698259456233041a3d4e232bf87e.tar.gz
cryptography-533a3c909d59698259456233041a3d4e232bf87e.tar.bz2
cryptography-533a3c909d59698259456233041a3d4e232bf87e.zip
change derive_elliptic_curve_public_point to return EllipticCurvePubl… (#3243)
* 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.
Diffstat (limited to 'tests/hazmat')
-rw-r--r--tests/hazmat/backends/test_multibackend.py6
1 files changed, 3 insertions, 3 deletions
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):