aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-12 11:50:44 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-12-15 15:49:50 -0600
commit6c660a88f1ed6d03968b26328a285cfecc4c9a2c (patch)
tree3870aa7d327c954b2ef645972fa2360323bad80f /tests/test_x509.py
parentd273adeae286186a71d38856dc2c2cea4acd378a (diff)
downloadcryptography-6c660a88f1ed6d03968b26328a285cfecc4c9a2c.tar.gz
cryptography-6c660a88f1ed6d03968b26328a285cfecc4c9a2c.tar.bz2
cryptography-6c660a88f1ed6d03968b26328a285cfecc4c9a2c.zip
raise error on unnamed EC curve certificates when calling public_key
...for now
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 638c7d1b..7a4d0b7d 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -179,3 +179,13 @@ class TestECDSAX509Certificate(object):
)
public_key = cert.public_key()
assert isinstance(public_key, interfaces.EllipticCurvePublicKey)
+
+ def test_load_ecdsa_no_named_curve(self, backend):
+ _skip_curve_unsupported(backend, ec.SECP256R1())
+ cert = _load_cert(
+ os.path.join("x509", "custom", "ec_no_named_curve.pem"),
+ x509.load_pem_x509_certificate,
+ backend
+ )
+ with pytest.raises(NotImplementedError):
+ cert.public_key()