diff options
Diffstat (limited to 'tls.c')
-rw-r--r-- | tls.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -232,9 +232,13 @@ tls_init () { SSL_load_error_strings (); #if defined HAVE_PTHREADS - if (CRYPTO_get_locking_callback () == NULL) + /* OpenSSL 1.1 removed the locking functions and finally implemented + * its own thread safety. In this case the locking callback will + * return null even after we initialize it. So if we have already + * allocated mutexes, don't consider that a failure. + */ + if ((CRYPTO_get_locking_callback () == NULL) || (s_openssl_mutexes_count > 0)) { - assert (s_openssl_mutexes_count == 0); /* Allocate and initialise mutexes. We will never free these. FIXME: Is there a portable way of having a function invoked when a solib is unloaded? -ln */ |