diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-04-01 12:04:44 +0100 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-04-01 12:11:12 +0100 |
commit | 976945d4078bcd16eb5a95526e6b26ace7b19bd3 (patch) | |
tree | 49d741ce3e25aa51638300ade46f2c643e77ce3b /tests/hazmat/backends | |
parent | 621635712962267e589b19fb2292a764e5ad71de (diff) | |
download | cryptography-976945d4078bcd16eb5a95526e6b26ace7b19bd3.tar.gz cryptography-976945d4078bcd16eb5a95526e6b26ace7b19bd3.tar.bz2 cryptography-976945d4078bcd16eb5a95526e6b26ace7b19bd3.zip |
Add _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r-- | tests/hazmat/backends/test_multibackend.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py index b7bcaf69..c91cb471 100644 --- a/tests/hazmat/backends/test_multibackend.py +++ b/tests/hazmat/backends/test_multibackend.py @@ -179,13 +179,19 @@ class TestMultiBackend(object): padding.PKCS1v15(), hashes.MD5()) backend = MultiBackend([]) - with pytest.raises(UnsupportedAlgorithm): + with raises_unsupported_algorithm( + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM + ): backend.generate_rsa_private_key(key_size=1024, public_exponent=3) - with pytest.raises(UnsupportedAlgorithm): + with raises_unsupported_algorithm( + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM + ): backend.create_rsa_signature_ctx("private_key", padding.PKCS1v15(), hashes.MD5()) - with pytest.raises(UnsupportedAlgorithm): + with raises_unsupported_algorithm( + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM + ): backend.create_rsa_verification_ctx( "public_key", "sig", padding.PKCS1v15(), hashes.MD5()) |