summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-11-23 10:40:06 +1100
committerDamien Miller <djm@mindrot.org>2018-11-23 10:42:05 +1100
commit42c5ec4b97b6a1bae70f323952d0646af16ce710 (patch)
tree6d85f7daebb7241b80bc91126f433dca62e850e8 /configure.ac
parent5b60b6c02009547a3e2a99d4886965de2a4719da (diff)
refactor libcrypto initialisation
Don't call OpenSSL_add_all_algorithms() unless OpenSSL actually supports it. Move all libcrypto initialisation to a single function, and call that from seed_rng() that is called early in each tool's main(). Prompted by patch from Rosen Penev
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 3f7fe2cd0..5a9b3ff11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2671,8 +2671,8 @@ if test "x$openssl" = "xyes" ; then
2671 2671
2672 AC_MSG_CHECKING([if programs using OpenSSL functions will link]) 2672 AC_MSG_CHECKING([if programs using OpenSSL functions will link])
2673 AC_LINK_IFELSE( 2673 AC_LINK_IFELSE(
2674 [AC_LANG_PROGRAM([[ #include <openssl/evp.h> ]], 2674 [AC_LANG_PROGRAM([[ #include <openssl/err.h> ]],
2675 [[ OpenSSL_add_all_algorithms(); ]])], 2675 [[ ERR_load_crypto_strings(); ]])],
2676 [ 2676 [
2677 AC_MSG_RESULT([yes]) 2677 AC_MSG_RESULT([yes])
2678 ], 2678 ],
@@ -2682,8 +2682,8 @@ if test "x$openssl" = "xyes" ; then
2682 LIBS="$LIBS -ldl" 2682 LIBS="$LIBS -ldl"
2683 AC_MSG_CHECKING([if programs using OpenSSL need -ldl]) 2683 AC_MSG_CHECKING([if programs using OpenSSL need -ldl])
2684 AC_LINK_IFELSE( 2684 AC_LINK_IFELSE(
2685 [AC_LANG_PROGRAM([[ #include <openssl/evp.h> ]], 2685 [AC_LANG_PROGRAM([[ #include <openssl/err.h> ]],
2686 [[ OpenSSL_add_all_algorithms(); ]])], 2686 [[ ERR_load_crypto_strings(); ]])],
2687 [ 2687 [
2688 AC_MSG_RESULT([yes]) 2688 AC_MSG_RESULT([yes])
2689 ], 2689 ],
@@ -2698,15 +2698,16 @@ if test "x$openssl" = "xyes" ; then
2698 AC_CHECK_FUNCS([ \ 2698 AC_CHECK_FUNCS([ \
2699 BN_is_prime_ex \ 2699 BN_is_prime_ex \
2700 DSA_generate_parameters_ex \ 2700 DSA_generate_parameters_ex \
2701 EVP_DigestInit_ex \ 2701 EVP_CIPHER_CTX_ctrl \
2702 EVP_DigestFinal_ex \ 2702 EVP_DigestFinal_ex \
2703 EVP_MD_CTX_init \ 2703 EVP_DigestInit_ex \
2704 EVP_MD_CTX_cleanup \ 2704 EVP_MD_CTX_cleanup \
2705 EVP_MD_CTX_copy_ex \ 2705 EVP_MD_CTX_copy_ex \
2706 EVP_MD_CTX_init \
2706 HMAC_CTX_init \ 2707 HMAC_CTX_init \
2708 OpenSSL_add_all_algorithms \
2707 RSA_generate_key_ex \ 2709 RSA_generate_key_ex \
2708 RSA_get_default_method \ 2710 RSA_get_default_method \
2709 EVP_CIPHER_CTX_ctrl \
2710 ]) 2711 ])
2711 # LibreSSL/OpenSSL 1.1x API 2712 # LibreSSL/OpenSSL 1.1x API
2712 AC_CHECK_FUNCS([ \ 2713 AC_CHECK_FUNCS([ \