aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2019-07-27 16:44:53 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2019-07-27 17:44:53 -0400
commit85d6043f21bbc8bc3f97f8a8be25581f8bc7f376 (patch)
tree8db6493d467dbbd71ba3f26d470d678a2464a487 /src/_cffi_src
parent25efc646152c3b9e3e4d2ffcd81ccb52055782f3 (diff)
downloadcryptography-85d6043f21bbc8bc3f97f8a8be25581f8bc7f376.tar.gz
cryptography-85d6043f21bbc8bc3f97f8a8be25581f8bc7f376.tar.bz2
cryptography-85d6043f21bbc8bc3f97f8a8be25581f8bc7f376.zip
fix osrandom/builtin switching methods for 1.1.0+ (#4955)
* fix osrandom/builtin switching methods for 1.1.0+ In 1.1.0 RAND_cleanup became a no-op. This broke changing to the builtin random engine via activate_builtin_random(). Fixed by directly calling RAND_set_rand_method. This works on 1.0.x and 1.1.x * missed an assert
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/rand.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_cffi_src/openssl/rand.py b/src/_cffi_src/openssl/rand.py
index 68653927..c0cd6836 100644
--- a/src/_cffi_src/openssl/rand.py
+++ b/src/_cffi_src/openssl/rand.py
@@ -9,10 +9,13 @@ INCLUDES = """
"""
TYPES = """
+typedef ... RAND_METHOD;
+
static const long Cryptography_HAS_EGD;
"""
FUNCTIONS = """
+int RAND_set_rand_method(const RAND_METHOD *);
void RAND_add(const void *, int, double);
int RAND_status(void);
int RAND_bytes(unsigned char *, int);
@@ -21,9 +24,6 @@ int RAND_bytes(unsigned char *, int);
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);
"""
CUSTOMIZATIONS = """