aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 9054c4ed..c042169c 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -1241,6 +1241,22 @@ class TestRSACertificateRequest(object):
with pytest.raises(TypeError):
request.public_bytes('NotAnEncoding')
+ def test_signature_invalid(self, backend):
+ request = _load_cert(
+ os.path.join("x509", "requests", "invalid_signature.pem"),
+ x509.load_pem_x509_csr,
+ backend
+ )
+ assert not request.is_signature_valid
+
+ def test_signature_valid(self, backend):
+ request = _load_cert(
+ os.path.join("x509", "requests", "rsa_sha256.pem"),
+ x509.load_pem_x509_csr,
+ backend
+ )
+ assert request.is_signature_valid
+
@pytest.mark.parametrize(
("request_path", "loader_func", "encoding"),
[