aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_x509.py
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2015-07-20 21:22:33 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2015-07-20 22:47:06 -0500
commitb77c716a2935b2fc1de30092ebacdaefae184414 (patch)
tree278df403b553e704b773ebe16713277b39ae5d71 /tests/test_x509.py
parent9e0666e0bdd7b8357c0f95b46e8cdad8cfea7a75 (diff)
downloadcryptography-b77c716a2935b2fc1de30092ebacdaefae184414.tar.gz
cryptography-b77c716a2935b2fc1de30092ebacdaefae184414.tar.bz2
cryptography-b77c716a2935b2fc1de30092ebacdaefae184414.zip
Add tests to test_openssl backend for extra coverage
Diffstat (limited to 'tests/test_x509.py')
-rw-r--r--tests/test_x509.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 7a069136..c4a423aa 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -961,6 +961,15 @@ class TestCertificateBuilder(object):
with pytest.raises(NotImplementedError):
builder.add_extension(object(), False)
+ @pytest.mark.requires_backend_interface(interface=RSABackend)
+ @pytest.mark.requires_backend_interface(interface=X509Backend)
+ def test_sign_with_unsupported_hash(self, backend):
+ private_key = RSA_KEY_2048.private_key(backend)
+ builder = x509.CertificateBuilder()
+
+ with pytest.raises(TypeError):
+ builder.sign(backend, private_key, object())
+
@pytest.mark.requires_backend_interface(interface=X509Backend)
class TestCertificateSigningRequestBuilder(object):