From 8e764396471beb13d0cdfbc9a299b9445f96abb2 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 20 Apr 2014 10:25:48 -0500 Subject: more key length checks, docs update --- tests/hazmat/primitives/test_rsa.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 69fd2933..a5266d57 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1249,8 +1249,10 @@ class TestRSADecryption(object): public_exponent=private["public_exponent"], modulus=private["modulus"] ) + ciphertext = binascii.unhexlify(example["encryption"]) + assert len(ciphertext) == math.ceil(skey.key_size / 8.0) message = skey.decrypt( - binascii.unhexlify(example["encryption"]), + ciphertext, padding.PKCS1v15(), backend ) -- cgit v1.2.3