aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends/test_openssl.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-15 14:16:35 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-20 16:53:03 -0500
commit7bdcdc175675bc78edaa7e0f931676652ab7a427 (patch)
treef33ccfc69cb384debea40eef14454667a15bd620 /tests/hazmat/backends/test_openssl.py
parent4d7d44e1be9f4bfe0aae9e395b231f34d431aaaf (diff)
downloadcryptography-7bdcdc175675bc78edaa7e0f931676652ab7a427.tar.gz
cryptography-7bdcdc175675bc78edaa7e0f931676652ab7a427.tar.bz2
cryptography-7bdcdc175675bc78edaa7e0f931676652ab7a427.zip
remove OAEP decryption to simplify review
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r--tests/hazmat/backends/test_openssl.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 46feae46..c589506f 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -291,54 +291,3 @@ class TestOpenSSLRSA(object):
def test_unsupported_mgf1_hash_algorithm(self):
assert backend.mgf1_hash_supported(DummyHash()) is False
-
- def test_unsupported_mgf1_hash_algorithm_decrypt(self):
- private_key = rsa.RSAPrivateKey.generate(
- public_exponent=65537,
- key_size=512,
- backend=backend
- )
- with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_HASH):
- private_key.decrypt(
- b"ciphertext",
- padding.OAEP(
- mgf=padding.MGF1(algorithm=hashes.SHA256()),
- algorithm=hashes.SHA1(),
- label=None
- ),
- backend
- )
-
- def test_unsupported_oaep_hash_algorithm_decrypt(self):
- private_key = rsa.RSAPrivateKey.generate(
- public_exponent=65537,
- key_size=512,
- backend=backend
- )
- with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_HASH):
- private_key.decrypt(
- b"ciphertext",
- padding.OAEP(
- mgf=padding.MGF1(algorithm=hashes.SHA1()),
- algorithm=hashes.SHA256(),
- label=None
- ),
- backend
- )
-
- def test_unsupported_oaep_label_decrypt(self):
- private_key = rsa.RSAPrivateKey.generate(
- public_exponent=65537,
- key_size=512,
- backend=backend
- )
- with pytest.raises(ValueError):
- private_key.decrypt(
- b"ciphertext",
- padding.OAEP(
- mgf=padding.MGF1(algorithm=hashes.SHA1()),
- algorithm=hashes.SHA1(),
- label=b"label"
- ),
- backend
- )