aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorChristopher Grebs <cg@webshox.org>2015-09-05 00:25:25 +0200
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-27 22:53:23 -0600
commitb4ff1182c4e6587369df0e96d072b06d40a8dd0c (patch)
tree00d8753ca291fe4e737e1e386437d41281c77e22 /tests/hazmat/backends
parentcb77736766fcd123ba2edd15502127455a4d7d6f (diff)
downloadcryptography-b4ff1182c4e6587369df0e96d072b06d40a8dd0c.tar.gz
cryptography-b4ff1182c4e6587369df0e96d072b06d40a8dd0c.tar.bz2
cryptography-b4ff1182c4e6587369df0e96d072b06d40a8dd0c.zip
Move private key initialization out of pytest.raises block
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 545ca6c2..37633d6c 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -468,8 +468,10 @@ class TestOpenSSLRSA(object):
)
)
+ private_key_alt = RSA_KEY_512_ALT.private_key(backend)
+
with pytest.raises(ValueError):
- RSA_KEY_512_ALT.private_key(backend).decrypt(
+ private_key_alt.decrypt(
ciphertext,
padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA1()),