diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-08-16 20:59:54 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-08-16 08:59:54 -0400 |
commit | 54b145f2c3852dc6c74698ed4f9f71e6434315b3 (patch) | |
tree | c1d6d5f9225c0fd4edfa4094179c48ecd67da125 | |
parent | 53da67090e7063325e5407fa08ad806c8c1feb8b (diff) | |
download | cryptography-54b145f2c3852dc6c74698ed4f9f71e6434315b3.tar.gz cryptography-54b145f2c3852dc6c74698ed4f9f71e6434315b3.tar.bz2 cryptography-54b145f2c3852dc6c74698ed4f9f71e6434315b3.zip |
ERR_load_RAND_strings changed function signature in 1.1.0 (#3093)
* ERR_load_RAND_strings changed function signature in 1.1.0
Here is a hack to avoid breaking pyOpenSSL.
* not sure how I managed that. I blame vim
-rw-r--r-- | src/_cffi_src/openssl/rand.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/_cffi_src/openssl/rand.py b/src/_cffi_src/openssl/rand.py index f4a143e8..5f24a8d0 100644 --- a/src/_cffi_src/openssl/rand.py +++ b/src/_cffi_src/openssl/rand.py @@ -13,7 +13,6 @@ static const long Cryptography_HAS_EGD; """ FUNCTIONS = """ -void ERR_load_RAND_strings(void); void RAND_seed(const void *, int); void RAND_add(const void *, int, double); int RAND_status(void); @@ -24,6 +23,12 @@ int RAND_bytes(unsigned char *, int); """ MACROS = """ +/* ERR_load_RAND_strings started returning an int in 1.1.0. Unfortunately we + can't declare a conditional signature like that. Since it always returns + 1 we'll just lie about the signature to preserve compatibility for + pyOpenSSL (which calls this in its rand.py as of mid-2016) */ +void ERR_load_RAND_strings(void); + /* RAND_cleanup became a macro in 1.1.0 */ void RAND_cleanup(void); |