diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-14 16:04:44 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-20 16:53:03 -0500 |
commit | 34ce33859b87df620e1edf27ba88db5b7e151a25 (patch) | |
tree | 1e9875b059d15d72829a542bf3a07d83710f8743 | |
parent | db35b21a3eddda869d1e77bc9b8cb7f43370704d (diff) | |
download | cryptography-34ce33859b87df620e1edf27ba88db5b7e151a25.tar.gz cryptography-34ce33859b87df620e1edf27ba88db5b7e151a25.tar.bz2 cryptography-34ce33859b87df620e1edf27ba88db5b7e151a25.zip |
cover a missing line
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 38fab6ec..c43fd0b5 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1366,3 +1366,14 @@ class TestRSADecryption(object): padding.PKCS1v15(), backend ) + + def test_rsa_decrypt_invalid_backend(self, backend): + pretend_backend = object() + private_key = rsa.RSAPrivateKey.generate(65537, 2048, backend) + + with raises_unsupported_algorithm(_Reasons.BACKEND_MISSING_INTERFACE): + private_key.decrypt( + b"irrelevant", + padding.PKCS1v15(), + pretend_backend + ) |