From efad55978bd836380e423faa03503c0f537da3c4 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 6 Jul 2018 11:43:26 -0400 Subject: Make our locking setup function compy with our style guide (#4316) And not expose an unprefixed name to anyone who dlopens us. --- src/_cffi_src/openssl/callbacks.py | 4 ++-- src/cryptography/hazmat/bindings/openssl/binding.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py index e215ed4e..13c4e10c 100644 --- a/src/_cffi_src/openssl/callbacks.py +++ b/src/_cffi_src/openssl/callbacks.py @@ -33,7 +33,7 @@ typedef struct { """ FUNCTIONS = """ -int _setup_ssl_threads(void); +int Cryptography_setup_ssl_threads(void); int Cryptography_pem_password_cb(char *, int, int, void *); """ @@ -120,7 +120,7 @@ static void init_mutexes(void) { } -int _setup_ssl_threads(void) { +int Cryptography_setup_ssl_threads(void) { if (_ssl_locks == NULL) { _ssl_locks_count = CRYPTO_num_locks(); _ssl_locks = calloc(_ssl_locks_count, sizeof(Cryptography_mutex)); diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index 7d528adb..81cf547a 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -145,7 +145,7 @@ class Binding(object): # If nothing else has setup a locking callback already, we set up # our own - res = lib._setup_ssl_threads() + res = lib.Cryptography_setup_ssl_threads() _openssl_assert(cls.lib, res == 1) -- cgit v1.2.3