aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 0a120eba..1e1bde1d 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -103,3 +103,11 @@ class TestX509Certificate(object):
)
)
assert cert.version == x509.X509Version.v1
+
+ def test_invalid_pem(self, backend):
+ with pytest.raises(ValueError):
+ x509.load_pem_x509_certificate(b"notacert", backend)
+
+ def test_invalid_der(self, backend):
+ with pytest.raises(ValueError):
+ x509.load_der_x509_certificate(b"notacert", backend)