diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-12-28 07:35:34 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-12-28 07:35:34 -0500 |
commit | 42e0c790c5150bec47add345065929ca7df8e6ff (patch) | |
tree | 82a4420511ddab15d1667cb8095266b5bdeb4920 /src | |
parent | fb7659c5db43dd1e53d0934f27a3937bb4af3663 (diff) | |
parent | c809360573fc2ef659c154740c32e98f35fc5da9 (diff) | |
download | cryptography-42e0c790c5150bec47add345065929ca7df8e6ff.tar.gz cryptography-42e0c790c5150bec47add345065929ca7df8e6ff.tar.bz2 cryptography-42e0c790c5150bec47add345065929ca7df8e6ff.zip |
Merge pull request #2599 from reaperhulk/oaep-fix
Handle RSA_R_OAEP_DECODING_ERROR
Diffstat (limited to 'src')
-rw-r--r-- | src/_cffi_src/openssl/err.py | 1 | ||||
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/rsa.py | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py index 6ec13775..9d97be16 100644 --- a/src/_cffi_src/openssl/err.py +++ b/src/_cffi_src/openssl/err.py @@ -230,6 +230,7 @@ static const int RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY; static const int RSA_R_BLOCK_TYPE_IS_NOT_01; static const int RSA_R_BLOCK_TYPE_IS_NOT_02; static const int RSA_R_PKCS_DECODING_ERROR; +static const int RSA_R_OAEP_DECODING_ERROR; static const int RSA_F_RSA_SIGN; """ diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py index 664f6d35..033cd3b1 100644 --- a/src/cryptography/hazmat/backends/openssl/rsa.py +++ b/src/cryptography/hazmat/backends/openssl/rsa.py @@ -138,6 +138,7 @@ 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) |