From 1801cd11d99d05a66ab5248c0555f55909a355ce Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 8 Nov 2018 15:03:11 +1100 Subject: Simplify OpenSSL 1.1 function checks. Replace AC_SEARCH_LIBS checks for OpenSSL 1.1 functions with a single AC_CHECK_FUNCS. ok djm@ --- configure.ac | 150 +++++++++++++++-------------------------------------------- 1 file changed, 37 insertions(+), 113 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 199975fed..296124399 100644 --- a/configure.ac +++ b/configure.ac @@ -2722,6 +2722,43 @@ if test "x$openssl" = "xyes" ; then HMAC_CTX_init \ RSA_generate_key_ex \ RSA_get_default_method \ + EVP_CIPHER_CTX_ctrl \ + ]) + # LibreSSL/OpenSSL 1.1x API + AC_CHECK_FUNCS([ \ + DH_get0_key \ + DH_get0_pqg \ + DH_set0_key \ + DH_set_length \ + DH_set0_pqg \ + DSA_get0_key \ + DSA_get0_pqg \ + DSA_set0_key \ + DSA_set0_pqg \ + DSA_SIG_get0 \ + DSA_SIG_set0 \ + ECDSA_SIG_get0 \ + ECDSA_SIG_set0 \ + EVP_CIPHER_CTX_iv \ + EVP_CIPHER_CTX_iv_noconst \ + EVP_CIPHER_CTX_get_iv \ + EVP_CIPHER_CTX_set_iv \ + RSA_get0_crt_params \ + RSA_get0_factors \ + RSA_get0_key \ + RSA_set0_crt_params \ + RSA_set0_factors \ + RSA_set0_key \ + RSA_meth_free \ + RSA_meth_dup \ + RSA_meth_set1_name \ + RSA_meth_get_finish \ + RSA_meth_set_priv_enc \ + RSA_meth_set_priv_dec \ + RSA_meth_set_finish \ + EVP_PKEY_get0_RSA \ + EVP_MD_CTX_new \ + EVP_MD_CTX_free \ ]) if test "x$openssl_engine" = "xyes" ; then @@ -2807,119 +2844,6 @@ if test "x$openssl" = "xyes" ; then ] ) - AC_SEARCH_LIBS([EVP_CIPHER_CTX_ctrl], [crypto], - [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], - [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) - - # LibreSSL/OpenSSL 1.1x API - AC_SEARCH_LIBS([DH_get0_key], [crypto], - [AC_DEFINE([HAVE_DH_GET0_KEY], [1], - [Define if libcrypto has DH_get0_key])]) - AC_SEARCH_LIBS([DH_get0_pqg], [crypto], - [AC_DEFINE([HAVE_DH_GET0_PQG], [1], - [Define if libcrypto has DH_get0_pqg])]) - AC_SEARCH_LIBS([DH_set0_key], [crypto], - [AC_DEFINE([HAVE_DH_SET0_KEY], [1], - [Define if libcrypto has DH_set0_key])]) - AC_SEARCH_LIBS([DH_set_length], [crypto], - [AC_DEFINE([HAVE_DH_SET_LENGTH], [1], - [Define if libcrypto has DH_set_length])]) - AC_SEARCH_LIBS([DH_set0_pqg], [crypto], - [AC_DEFINE([HAVE_DH_SET0_PQG], [1], - [Define if libcrypto has DH_set0_pqg])]) - - AC_SEARCH_LIBS([DSA_get0_key], [crypto], - [AC_DEFINE([HAVE_DSA_GET0_KEY], [1], - [Define if libcrypto has DSA_get0_key])]) - AC_SEARCH_LIBS([DSA_get0_pqg], [crypto], - [AC_DEFINE([HAVE_DSA_GET0_PQG], [1], - [Define if libcrypto has DSA_get0_pqg])]) - AC_SEARCH_LIBS([DSA_set0_key], [crypto], - [AC_DEFINE([HAVE_DSA_SET0_KEY], [1], - [Define if libcrypto has DSA_set0_key])]) - AC_SEARCH_LIBS([DSA_set0_pqg], [crypto], - [AC_DEFINE([HAVE_DSA_SET0_PQG], [1], - [Define if libcrypto has DSA_set0_pqg])]) - - AC_SEARCH_LIBS([DSA_SIG_get0], [crypto], - [AC_DEFINE([HAVE_DSA_SIG_GET0], [1], - [Define if libcrypto has DSA_SIG_get0])]) - AC_SEARCH_LIBS([DSA_SIG_set0], [crypto], - [AC_DEFINE([HAVE_DSA_SIG_SET0], [1], - [Define if libcrypto has DSA_SIG_set0])]) - - AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto], - [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1], - [Define if libcrypto has ECDSA_SIG_get0])]) - AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto], - [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1], - [Define if libcrypto has ECDSA_SIG_set0])]) - - AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto], - [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1], - [Define if libcrypto has EVP_CIPHER_CTX_iv])]) - AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto], - [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1], - [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])]) - AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto], - [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1], - [Define if libcrypto has EVP_CIPHER_CTX_get_iv])]) - AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto], - [AC_DEFINE([HAVE_EVP_CIPHER_CTX_SET_IV], [1], - [Define if libcrypto has EVP_CIPHER_CTX_set_iv])]) - - AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto], - [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1], - [Define if libcrypto has RSA_get0_crt_params])]) - AC_SEARCH_LIBS([RSA_get0_factors], [crypto], - [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1], - [Define if libcrypto has RSA_get0_factors])]) - AC_SEARCH_LIBS([RSA_get0_key], [crypto], - [AC_DEFINE([HAVE_RSA_GET0_KEY], [1], - [Define if libcrypto has RSA_get0_key])]) - AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto], - [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1], - [Define if libcrypto has RSA_get0_srt_params])]) - AC_SEARCH_LIBS([RSA_set0_factors], [crypto], - [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1], - [Define if libcrypto has RSA_set0_factors])]) - AC_SEARCH_LIBS([RSA_set0_key], [crypto], - [AC_DEFINE([HAVE_RSA_SET0_KEY], [1], - [Define if libcrypto has RSA_set0_key])]) - - AC_SEARCH_LIBS([RSA_meth_free], [crypto], - [AC_DEFINE([HAVE_RSA_METH_FREE], [1], - [Define if libcrypto has RSA_meth_free])]) - AC_SEARCH_LIBS([RSA_meth_dup], [crypto], - [AC_DEFINE([HAVE_RSA_METH_DUP], [1], - [Define if libcrypto has RSA_meth_dup])]) - AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto], - [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1], - [Define if libcrypto has RSA_meth_set1_name])]) - AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto], - [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1], - [Define if libcrypto has RSA_meth_get_finish])]) - AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto], - [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1], - [Define if libcrypto has RSA_meth_set_priv_enc])]) - AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto], - [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1], - [Define if libcrypto has RSA_meth_set_priv_dec])]) - AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto], - [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1], - [Define if libcrypto has RSA_meth_set_finish])]) - - AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto], - [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1], - [Define if libcrypto has EVP_PKEY_get0_RSA])]) - - AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto], - [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1], - [Define if libcrypto has EVP_MD_CTX_new])]) - AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto], - [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1], - [Define if libcrypto has EVP_MD_CTX_free])]) - AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([[ -- cgit v1.2.3