From 54b145f2c3852dc6c74698ed4f9f71e6434315b3 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 16 Aug 2016 20:59:54 +0800 Subject: 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 --- src/_cffi_src/openssl/rand.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/_cffi_src') 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); -- cgit v1.2.3