From: Nikolai Kondrashov Date: Fri, 18 Nov 2016 18:08:40 +0000 (+0200) Subject: Check for EVP_CIPHER_CTX_new to detect libcrypto X-Git-Tag: release_3_0_13~92^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b3a5018d08a37211dd3f89c93f74efecf37ac84;p=thirdparty%2Ffreeradius-server.git Check for EVP_CIPHER_CTX_new to detect libcrypto Switch to checking for EVP_CIPHER_CTX_new instead of EVP_cleanup to detect presence of libcrypto, because EVP_cleanup was removed as symbol from OpenSSL 1.1, and the check would always fail. --- diff --git a/src/modules/rlm_eap/types/rlm_eap_fast/configure b/src/modules/rlm_eap/types/rlm_eap_fast/configure index 8bc846e565f..f68299bc7e5 100755 --- a/src/modules/rlm_eap/types/rlm_eap_fast/configure +++ b/src/modules/rlm_eap/types/rlm_eap_fast/configure @@ -2893,7 +2893,7 @@ smart_prefix= sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'` -sm_func_safe=`echo "EVP_cleanup" | sed 'y%./+-%__p_%'` +sm_func_safe=`echo "EVP_CIPHER_CTX_new" | sed 'y%./+-%__p_%'` old_LIBS="$LIBS" old_CPPFLAGS="$CPPFLAGS" @@ -2903,17 +2903,17 @@ smart_lib_dir= if test "x$smart_try_dir" != "x"; then for try in $smart_try_dir; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_cleanup in -lcrypto in $try" >&5 -$as_echo_n "checking for EVP_cleanup in -lcrypto in $try... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto in $try" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto in $try... " >&6; } LIBS="-lcrypto $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -extern char EVP_cleanup(); +extern char EVP_CIPHER_CTX_new(); int main () { -EVP_cleanup() +EVP_CIPHER_CTX_new() ; return 0; } @@ -2938,16 +2938,16 @@ rm -f core conftest.err conftest.$ac_objext \ fi if test "x$smart_lib" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_cleanup in -lcrypto" >&5 -$as_echo_n "checking for EVP_cleanup in -lcrypto... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto... " >&6; } LIBS="-lcrypto $old_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -extern char EVP_cleanup(); +extern char EVP_CIPHER_CTX_new(); int main () { -EVP_cleanup() +EVP_CIPHER_CTX_new() ; return 0; } @@ -3024,17 +3024,17 @@ eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\"" for try in $smart_lib_dir /usr/local/lib /opt/lib; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_cleanup in -lcrypto in $try" >&5 -$as_echo_n "checking for EVP_cleanup in -lcrypto in $try... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_CIPHER_CTX_new in -lcrypto in $try" >&5 +$as_echo_n "checking for EVP_CIPHER_CTX_new in -lcrypto in $try... " >&6; } LIBS="-lcrypto $old_LIBS" CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -extern char EVP_cleanup(); +extern char EVP_CIPHER_CTX_new(); int main () { -EVP_cleanup() +EVP_CIPHER_CTX_new() ; return 0; } @@ -3064,7 +3064,7 @@ if test "x$smart_lib" != "x"; then SMART_LIBS="$smart_ldflags $smart_lib $SMART_LIBS" fi - if test "x$ac_cv_lib_crypto_EVP_cleanup" != "xyes"; then + if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" != "xyes"; then fail="libssl" fi diff --git a/src/modules/rlm_eap/types/rlm_eap_fast/configure.ac b/src/modules/rlm_eap/types/rlm_eap_fast/configure.ac index 0548ddb0ed8..e52e7545902 100644 --- a/src/modules/rlm_eap/types/rlm_eap_fast/configure.ac +++ b/src/modules/rlm_eap/types/rlm_eap_fast/configure.ac @@ -60,8 +60,8 @@ if test x$with_[]modname != xno; then fi smart_try_dir=$openssl_lib_dir - FR_SMART_CHECK_LIB(crypto, EVP_cleanup) - if test "x$ac_cv_lib_crypto_EVP_cleanup" != "xyes"; then + FR_SMART_CHECK_LIB(crypto, EVP_CIPHER_CTX_new) + if test "x$ac_cv_lib_crypto_EVP_CIPHER_CTX_new" != "xyes"; then fail="libssl" fi