add test for invalid PEM CSR
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 3665adc..22b93f6 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -359,6 +359,10 @@
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"),