+ HAVE_RSA_SET0_KEY=yes
+ AC_CHECK_DECL([RSA_set0_key], [], [], [#include <openssl/rsa.h>])
+ AC_CHECK_LIB([crypto], [RSA_set0_key], [], [])
+ if test "$ac_cv_have_decl_RSA_set0_key" != "$ac_cv_lib_crypto_RSA_set0_key"; then
+ AC_MSG_ERROR([openssl header/library mismatch])
+ fi
+ test "$ac_cv_have_decl_RSA_set0_key" = yes &&
+ AC_DEFINE([HAVE_RSA_SET0_KEY], [1], [openssl >= 1.1])
+
+ HAVE_CRYPTO_CLEANUP_ALL_EX_DATA=yes
+ AC_CHECK_DECL([CRYPTO_cleanup_all_ex_data], [],
+ [HAVE_CRYPTO_CLEANUP_ALL_EX_DATA=no],
+ [#include <openssl/rsa.h>])
+ AC_CHECK_LIB([crypto], [CRYPTO_cleanup_all_ex_data], [],
+ [HAVE_CRYPTO_CLEANUP_ALL_EX_DATA=no])
+ 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])