From 34ce33859b87df620e1edf27ba88db5b7e151a25 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 14 Apr 2014 16:04:44 -0400 Subject: cover a missing line --- tests/hazmat/primitives/test_rsa.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/hazmat') 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 + ) -- cgit v1.2.3