test $HAVE_CRYPTO_CLEANUP_ALL_EX_DATA = yes &&
AC_DEFINE([HAVE_CRYPTO_CLEANUP_ALL_EX_DATA], [1],
[not available on FreeBSD 12])
+ HAVE_OPENSSL_THREAD_STOP=yes
+ AC_CHECK_DECL([OPENSSL_thread_stop], [],
+ [HAVE_OPENSSL_THREAD_STOP=no],
+ [#include <openssl/crypto.h>])
+ AC_CHECK_LIB([crypto], [OPENSSL_thread_stop], [],
+ [HAVE_OPENSSL_THREAD_STOP=no])
+ test $HAVE_OPENSSL_THREAD_STOP = yes &&
+ AC_DEFINE([HAVE_OPENSSL_THREAD_STOP], [1],
+ [not available on openssl-1.0])
fi
UNSTASH_FLAGS
######################################################################### gcrypt
#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
CRYPTO_cleanup_all_ex_data();
#endif
+#ifdef HAVE_OPENSSL_THREAD_STOP /* openssl-1.1 or later */
+ OPENSSL_thread_stop();
+#else /* openssl-1.0 */
+ ERR_remove_thread_state(NULL);
+#endif
+ EVP_cleanup();
}
/*