diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-12-12 11:50:44 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-12-15 15:49:50 -0600 |
commit | 6c660a88f1ed6d03968b26328a285cfecc4c9a2c (patch) | |
tree | 3870aa7d327c954b2ef645972fa2360323bad80f /tests | |
parent | d273adeae286186a71d38856dc2c2cea4acd378a (diff) | |
download | cryptography-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')
-rw-r--r-- | tests/test_x509.py | 10 |
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() |