Make our locking setup function compy with our style guide (#4316)
And not expose an unprefixed name to anyone who dlopens us.
diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py
index e215ed4..13c4e10 100644
--- a/src/_cffi_src/openssl/callbacks.py
+++ b/src/_cffi_src/openssl/callbacks.py
@@ -33,7 +33,7 @@
"""
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 @@
}
-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 7d528ad..81cf547 100644
--- a/src/cryptography/hazmat/bindings/openssl/binding.py
+++ b/src/cryptography/hazmat/bindings/openssl/binding.py
@@ -145,7 +145,7 @@
# 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)