diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-08-25 13:10:49 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-08-25 13:10:49 -0700 |
commit | 35bb89a4dbd0b9b5795ac1938db09ca42887b715 (patch) | |
tree | 84eb6c0d361dd9ed61945074a3dc171e21a9266a /tests/hazmat/primitives/test_rsa.py | |
parent | dda54aa7b1f40601fd4dc58f6c4d1e21c192edbd (diff) | |
download | cryptography-35bb89a4dbd0b9b5795ac1938db09ca42887b715.tar.gz cryptography-35bb89a4dbd0b9b5795ac1938db09ca42887b715.tar.bz2 cryptography-35bb89a4dbd0b9b5795ac1938db09ca42887b715.zip |
Verify that padding is an instance of AsymmetircPadding before trying to use it; fixes #1318
Diffstat (limited to 'tests/hazmat/primitives/test_rsa.py')
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index e53ff06b..88b30d61 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1616,6 +1616,8 @@ class TestRSAEncryption(object): with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_PADDING): public_key.encrypt(b"somedata", DummyPadding()) + with pytest.raises(TypeError): + public_key.encrypt(b"somedata", padding=object()) def test_unsupported_oaep_mgf(self, backend): private_key = RSA_KEY_512.private_key(backend) |