diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-07-20 13:04:25 +0200 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-07-20 07:04:25 -0400 |
commit | 0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb (patch) | |
tree | 2474a443821ba4b1fb7d9f7018aba278865b7669 /tests/hazmat/backends/test_openssl.py | |
parent | d3c4ba3a790883be17ca0a4e7ae291d261771700 (diff) | |
download | cryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.tar.gz cryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.tar.bz2 cryptography-0d6aaf49c1890378ce7ecf741a3a40c859d3b9fb.zip |
remove deprecated items (#3794)
* remove deprecated items
whirlpool, ripemd160, unsupportedextension, and the old interfaces
* flake8 and remove a test generator we no longe use
* make it clear we warned you about these things
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index d8e7fe47..3a73a370 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -365,24 +365,6 @@ class TestOpenSSLRSA(object): ), ) is True - def test_rsa_padding_unsupported_oaep_ripemd160_sha1(self): - assert backend.rsa_padding_supported( - padding.OAEP( - mgf=padding.MGF1(algorithm=hashes.RIPEMD160()), - algorithm=hashes.SHA1(), - label=None - ), - ) is False - - def test_rsa_padding_unsupported_oaep_sha1_ripemd160(self): - assert backend.rsa_padding_supported( - padding.OAEP( - mgf=padding.MGF1(algorithm=hashes.SHA1()), - algorithm=hashes.RIPEMD160(), - label=None - ), - ) is False - def test_rsa_padding_unsupported_mgf(self): assert backend.rsa_padding_supported( padding.OAEP( @@ -428,26 +410,14 @@ class TestOpenSSLRSA(object): ) ) - def test_unsupported_mgf1_hash_algorithm_ripemd160_decrypt(self): - private_key = RSA_KEY_512.private_key(backend) - with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_PADDING): - private_key.decrypt( - b"0" * 64, - padding.OAEP( - mgf=padding.MGF1(algorithm=hashes.RIPEMD160()), - algorithm=hashes.RIPEMD160(), - label=None - ) - ) - - def test_unsupported_mgf1_hash_algorithm_whirlpool_decrypt(self): + def test_unsupported_mgf1_hash_algorithm_md5_decrypt(self): private_key = RSA_KEY_512.private_key(backend) with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_PADDING): private_key.decrypt( b"0" * 64, padding.OAEP( - mgf=padding.MGF1(algorithm=hashes.Whirlpool()), - algorithm=hashes.Whirlpool(), + mgf=padding.MGF1(algorithm=hashes.MD5()), + algorithm=hashes.MD5(), label=None ) ) |