aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2020-04-26 11:44:49 -0400
committerGitHub <noreply@github.com>2020-04-26 10:44:49 -0500
commit069691a27b98bbca13faa843a1408d631b691bea (patch)
tree1fd37395f752049e81e5aa691951362954594ba9 /src
parent8aa8665eaa0691acb84df627f86296e6e225773d (diff)
downloadcryptography-069691a27b98bbca13faa843a1408d631b691bea.tar.gz
cryptography-069691a27b98bbca13faa843a1408d631b691bea.tar.bz2
cryptography-069691a27b98bbca13faa843a1408d631b691bea.zip
Added wycheproof RSA PKCSv1 encryption tests (#5234)
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/openssl/err.py1
-rw-r--r--src/cryptography/hazmat/backends/openssl/rsa.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py
index d4033f5a..ecdc6e3d 100644
--- a/src/_cffi_src/openssl/err.py
+++ b/src/_cffi_src/openssl/err.py
@@ -100,6 +100,7 @@ static const int PEM_R_UNSUPPORTED_ENCRYPTION;
static const int PKCS12_R_PKCS12_CIPHERFINAL_ERROR;
+static const int RSA_R_BAD_PAD_BYTE_COUNT;
static const int RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE;
static const int RSA_R_DATA_TOO_LARGE_FOR_MODULUS;
static const int RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY;
diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py
index 458071ca..bd4a1bea 100644
--- a/src/cryptography/hazmat/backends/openssl/rsa.py
+++ b/src/cryptography/hazmat/backends/openssl/rsa.py
@@ -136,6 +136,7 @@ def _handle_rsa_enc_dec_error(backend, key):
)
else:
decoding_errors = [
+ backend._lib.RSA_R_BAD_PAD_BYTE_COUNT,
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,