aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/backends/openssl/rsa.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-27 23:55:39 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-12-27 23:55:39 -0600
commitc809360573fc2ef659c154740c32e98f35fc5da9 (patch)
tree82a4420511ddab15d1667cb8095266b5bdeb4920 /src/cryptography/hazmat/backends/openssl/rsa.py
parent7721785f388fbbfa3072e600931eefbf019442b7 (diff)
downloadcryptography-c809360573fc2ef659c154740c32e98f35fc5da9.tar.gz
cryptography-c809360573fc2ef659c154740c32e98f35fc5da9.tar.bz2
cryptography-c809360573fc2ef659c154740c32e98f35fc5da9.zip
RSA_R_OAEP_DECODING_ERROR is pretty ubiquitous
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/rsa.py')
-rw-r--r--src/cryptography/hazmat/backends/openssl/rsa.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py
index 1be6f059..033cd3b1 100644
--- a/src/cryptography/hazmat/backends/openssl/rsa.py
+++ b/src/cryptography/hazmat/backends/openssl/rsa.py
@@ -138,13 +138,11 @@ def _handle_rsa_enc_dec_error(backend, key):
decoding_errors = [
backend._lib.RSA_R_BLOCK_TYPE_IS_NOT_01,
backend._lib.RSA_R_BLOCK_TYPE_IS_NOT_02,
+ backend._lib.RSA_R_OAEP_DECODING_ERROR,
]
if backend._lib.Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR:
decoding_errors.append(backend._lib.RSA_R_PKCS_DECODING_ERROR)
- if backend._lib.Cryptography_HAS_RSA_R_OAEP_DECODING_ERROR:
- decoding_errors.append(backend._lib.RSA_R_OAEP_DECODING_ERROR)
-
assert errors[0].reason in decoding_errors
raise ValueError("Decryption failed.")