From 6c660a88f1ed6d03968b26328a285cfecc4c9a2c Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 12 Dec 2014 11:50:44 -0600 Subject: raise error on unnamed EC curve certificates when calling public_key ...for now --- tests/test_x509.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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() -- cgit v1.2.3