aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509_ext.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2015-08-03 08:26:42 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2015-08-03 08:26:42 -0500
commita0f00f47ea3aa53a31213843d60a4141e468f021 (patch)
treea663f2bb14b0ed45054c03971cb47005155cecb2 /tests/test_x509_ext.py
parent36a1238703a1aa7aff44654e2e551f2a022c9c1a (diff)
parent93b5e3efab0337c51c84c27208d9034b607f09e2 (diff)
downloadcryptography-a0f00f47ea3aa53a31213843d60a4141e468f021.tar.gz
cryptography-a0f00f47ea3aa53a31213843d60a4141e468f021.tar.bz2
cryptography-a0f00f47ea3aa53a31213843d60a4141e468f021.zip
Merge remote-tracking branch 'upstream/master' into cert-builder
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r--tests/test_x509_ext.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 7b135828..890709ae 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -2853,3 +2853,18 @@ class TestInhibitAnyPolicyExtension(object):
x509.OID_INHIBIT_ANY_POLICY
).value
assert iap.skip_certs == 5
+
+
+@pytest.mark.requires_backend_interface(interface=RSABackend)
+@pytest.mark.requires_backend_interface(interface=X509Backend)
+class TestInvalidExtension(object):
+ def test_invalid_certificate_policies_data(self, backend):
+ cert = _load_cert(
+ os.path.join(
+ "x509", "custom", "cp_invalid.pem"
+ ),
+ x509.load_pem_x509_certificate,
+ backend
+ )
+ with pytest.raises(ValueError):
+ cert.extensions