diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-27 22:55:17 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-12-27 22:55:17 -0600 |
commit | 9413994899cdfcfef45f429b5a9d47b8f194179b (patch) | |
tree | d115a5ec701de3d4b8c4c3d0ec2a14d23a6d850e /tests/hazmat | |
parent | b4ff1182c4e6587369df0e96d072b06d40a8dd0c (diff) | |
download | cryptography-9413994899cdfcfef45f429b5a9d47b8f194179b.tar.gz cryptography-9413994899cdfcfef45f429b5a9d47b8f194179b.tar.bz2 cryptography-9413994899cdfcfef45f429b5a9d47b8f194179b.zip |
pep8 fix, rename test, add a comment to explain it
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 37633d6c..665504b4 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -30,7 +30,9 @@ from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.modes import CBC, CTR, Mode from ..primitives.fixtures_dsa import DSA_KEY_2048 -from ..primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512, RSA_KEY_512_ALT +from ..primitives.fixtures_rsa import ( + RSA_KEY_2048, RSA_KEY_512, RSA_KEY_512_ALT +) from ..primitives.test_ec import _skip_curve_unsupported from ...utils import load_vectors_from_file, raises_unsupported_algorithm @@ -456,7 +458,9 @@ class TestOpenSSLRSA(object): ) ) - def test_supported_oaep_decrypt(self): + def test_invalid_oaep_decryption(self): + # More recent versions of OpenSSL may raise RSA_R_OAEP_DECODING_ERROR + # This test triggers it and confirms that we properly handle it. private_key = RSA_KEY_512.private_key(backend) ciphertext = private_key.public_key().encrypt( |