diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-01-21 21:17:19 -0600 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-01-21 22:17:19 -0500 |
commit | 5b3e735253d4cc1c7f51dedc11c9ca5eeb6f451f (patch) | |
tree | 7cd2194ca80e8e748b983260b322c281f1c03f70 /src/_cffi_src | |
parent | 7a127a5d0a5c6018affc9c4bdf03f4be7e6e25f8 (diff) | |
download | cryptography-5b3e735253d4cc1c7f51dedc11c9ca5eeb6f451f.tar.gz cryptography-5b3e735253d4cc1c7f51dedc11c9ca5eeb6f451f.tar.bz2 cryptography-5b3e735253d4cc1c7f51dedc11c9ca5eeb6f451f.zip |
bind EVP_R_MEMORY_LIMIT_EXCEEDED and update a test (#4726)
* bind EVP_R_MEMORY_LIMIT_EXCEEDED and update a test
This will allow OpenSSL 1.1.1 on 32-bit (including our Windows 32-bit
builders) to fail as expected. Technically this isn't a malloc error,
but rather failing because the allocation requested is larger than
32-bits, but raising a MemoryError still seems appropriate
* what you want an endif too?
Diffstat (limited to 'src/_cffi_src')
-rw-r--r-- | src/_cffi_src/openssl/err.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py index b4d053c6..d4033f5a 100644 --- a/src/_cffi_src/openssl/err.py +++ b/src/_cffi_src/openssl/err.py @@ -11,6 +11,7 @@ INCLUDES = """ TYPES = """ static const int Cryptography_HAS_EC_CODES; static const int Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR; +static const int Cryptography_HAS_EVP_R_MEMORY_LIMIT_EXCEEDED; static const int ERR_LIB_DH; static const int ERR_LIB_EVP; @@ -23,6 +24,7 @@ static const int ERR_LIB_SSL; static const int ERR_LIB_X509; static const int ERR_R_MALLOC_FAILURE; +static const int EVP_R_MEMORY_LIMIT_EXCEEDED; static const int ASN1_R_BOOLEAN_IS_WRONG_LENGTH; static const int ASN1_R_BUFFER_TOO_SMALL; @@ -170,4 +172,11 @@ static const long Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR = 1; static const long Cryptography_HAS_RSA_R_PKCS_DECODING_ERROR = 0; static const long RSA_R_PKCS_DECODING_ERROR = 0; #endif + +#ifdef EVP_R_MEMORY_LIMIT_EXCEEDED +static const long Cryptography_HAS_EVP_R_MEMORY_LIMIT_EXCEEDED = 1; +#else +static const long EVP_R_MEMORY_LIMIT_EXCEEDED = 0; +static const long Cryptography_HAS_EVP_R_MEMORY_LIMIT_EXCEEDED = 0; +#endif """ |