aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-24 16:24:21 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-09-26 16:02:36 -0500
commit84fc4e01afaae95d5a92703b045a37183be27988 (patch)
treec5c73b7078e9431120264e6ace63d375c3435c44 /tests/hazmat/backends
parent58f63ed781b73478ee3fe60ebe1cfdfd85df5186 (diff)
downloadcryptography-84fc4e01afaae95d5a92703b045a37183be27988.tar.gz
cryptography-84fc4e01afaae95d5a92703b045a37183be27988.tar.bz2
cryptography-84fc4e01afaae95d5a92703b045a37183be27988.zip
Process curve name when loading EC keys. Fixes #1336
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index d4c5e2e7..d2620060 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -493,7 +493,7 @@ class TestOpenSSLSerialisationWithOpenSSL(object):
)
-class TestOpenSSLNoEllipticCurve(object):
+class TestOpenSSLEllipticCurve(object):
def test_elliptic_curve_supported(self, monkeypatch):
monkeypatch.setattr(backend._lib, "Cryptography_HAS_EC", 0)
@@ -506,6 +506,9 @@ class TestOpenSSLNoEllipticCurve(object):
None, None
) is False
+ def test_sn_to_elliptic_curve_not_supported(self):
+ with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_ELLIPTIC_CURVE):
+ backend._sn_to_elliptic_curve(b"fake")
class TestDeprecatedRSABackendMethods(object):
def test_create_rsa_signature_ctx(self):