HMAC_CTX_free \
ASN1_STRING_get0_data \
CONF_modules_load_file \
+ CRYPTO_set_id_callback \
+ CRYPTO_set_locking_callback
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
/* Do we have the crypt function */
#undef HAVE_CRYPT
+/* Define to 1 if you have the `CRYPTO_set_id_callback' function. */
+#undef HAVE_CRYPTO_SET_ID_CALLBACK
+
+/* Define to 1 if you have the `CRYPTO_set_locking_callback' function. */
+#undef HAVE_CRYPTO_SET_LOCKING_CALLBACK
+
/* Define to 1 if you have the <crypt.h> header file. */
#undef HAVE_CRYPT_H
static pthread_mutex_t *ssl_mutexes = NULL;
+#ifdef HAVE_CRYPTO_SET_ID_CALLBACK
static unsigned long ssl_id_function(void)
{
unsigned long ret;
return ret;
}
+#endif
+#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
static void ssl_locking_function(int mode, int n, UNUSED char const *file, UNUSED int line)
{
if (mode & CRYPTO_LOCK) {
pthread_mutex_unlock(&(ssl_mutexes[n]));
}
}
+#endif
static int setup_ssl_mutexes(void)
{
pthread_mutex_init(&(ssl_mutexes[i]), NULL);
}
+#ifdef HAVE_CRYPTO_SET_ID_CALLBACK
CRYPTO_set_id_callback(ssl_id_function);
+#endif
+#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
CRYPTO_set_locking_callback(ssl_locking_function);
+#endif
return 1;
}
* We're no longer threaded. Remove the mutexes and free
* the memory.
*/
+#ifdef HAVE_CRYPTO_SET_ID_CALLBACK
CRYPTO_set_id_callback(NULL);
+#endif
+#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
CRYPTO_set_locking_callback(NULL);
+#endif
free(ssl_mutexes);
#endif