diff options
author | Tux <tuxxy@users.noreply.github.com> | 2018-12-08 18:15:51 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-12-08 20:15:51 -0500 |
commit | fbbd54fe017717706ffe48b168ff0639e88f4b43 (patch) | |
tree | 8c0166b2d68bcd79c2d63dec4165b6f28d62fe73 /src/_cffi_src | |
parent | c3d38b5d80a955aee4b160bb97464a20c4992da7 (diff) | |
download | cryptography-fbbd54fe017717706ffe48b168ff0639e88f4b43.tar.gz cryptography-fbbd54fe017717706ffe48b168ff0639e88f4b43.tar.bz2 cryptography-fbbd54fe017717706ffe48b168ff0639e88f4b43.zip |
Raise MemoryError when backend.derive_scrypt can't malloc enough (#4592)
* Raise MemoryError when backend.derive_scrypt can't malloc enough
* Expose ERR_R_MALLOC_FAILURE and use the reason_match pattern to catch it
* Add test_scrypt_malloc_failure in test_scrypt
* let's see if this passes
* add comment to filippo's blog post about scrypt's params
Diffstat (limited to 'src/_cffi_src')
-rw-r--r-- | src/_cffi_src/openssl/err.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py index 59751355..b4d053c6 100644 --- a/src/_cffi_src/openssl/err.py +++ b/src/_cffi_src/openssl/err.py @@ -22,6 +22,8 @@ static const int ERR_LIB_PKCS12; static const int ERR_LIB_SSL; static const int ERR_LIB_X509; +static const int ERR_R_MALLOC_FAILURE; + static const int ASN1_R_BOOLEAN_IS_WRONG_LENGTH; static const int ASN1_R_BUFFER_TOO_SMALL; static const int ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER; |