aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-08-25 13:10:49 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-08-25 13:10:49 -0700
commit35bb89a4dbd0b9b5795ac1938db09ca42887b715 (patch)
tree84eb6c0d361dd9ed61945074a3dc171e21a9266a /tests
parentdda54aa7b1f40601fd4dc58f6c4d1e21c192edbd (diff)
downloadcryptography-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')
-rw-r--r--tests/hazmat/primitives/test_rsa.py2
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)