aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-17 07:34:41 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-03-29 00:25:03 -0500
commitb759e29dfeb889015039041e3d1b74939ab3a53c (patch)
tree7e9a78b048ff33ff1712be9aec198da8955eb99a
parent7e007d54942f353dff0974bab7cb388d7a45deb2 (diff)
downloadcryptography-b759e29dfeb889015039041e3d1b74939ab3a53c.tar.gz
cryptography-b759e29dfeb889015039041e3d1b74939ab3a53c.tar.bz2
cryptography-b759e29dfeb889015039041e3d1b74939ab3a53c.zip
add test for invalid PEM CSR
-rw-r--r--tests/test_x509.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 3665adc3..22b93f61 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -359,6 +359,10 @@ class TestRSACertificate(object):
x509.NameAttribute(x509.OID_COMMON_NAME, 'cryptography.io'),
]
+ def test_invalid_certificate_request_pem(self, backend):
+ with pytest.raises(ValueError):
+ x509.load_pem_x509_csr(b"notacsr", backend)
+
def test_unsupported_signature_hash_algorithm_request(self, backend):
request = _load_cert(
os.path.join("x509", "requests", "rsa_md4.pem"),