From 84fc4e01afaae95d5a92703b045a37183be27988 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 24 Sep 2014 16:24:21 -0500 Subject: Process curve name when loading EC keys. Fixes #1336 --- tests/hazmat/backends/test_openssl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/hazmat/backends/test_openssl.py') 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): -- cgit v1.2.3 From c5e43429c26dd1b1baddeec9fddf3cb5d98bcfc1 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 24 Sep 2014 22:37:22 -0500 Subject: learn to pep8 --- tests/hazmat/backends/test_openssl.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/hazmat/backends/test_openssl.py') diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index d2620060..110bbdba 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -510,6 +510,7 @@ class TestOpenSSLEllipticCurve(object): 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): private_key = rsa.RSAPrivateKey.generate(65537, 512, backend) -- cgit v1.2.3