summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-09-13 12:13:50 +1000
committerDamien Miller <djm@mindrot.org>2018-09-13 12:13:50 +1000
commit48f54b9d12c1c79fba333bc86d455d8f4cda8cfc (patch)
tree216db3d44f6d07262ce4757e65705fcc9fb6b5fa /configure.ac
parent86112951d63d48839f035b5795be62635a463f99 (diff)
adapt -portable to OpenSSL 1.1x API
Polyfill missing API with replacement functions extracted from LibreSSL
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac112
1 files changed, 111 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 83e530750..c0e120fe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2602,9 +2602,10 @@ if test "x$openssl" = "xyes" ; then
2602 AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")]) 2602 AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
2603 ;; 2603 ;;
2604 100*) ;; # 1.0.x 2604 100*) ;; # 1.0.x
2605 101*) ;; # 1.1.x
2605 200*) ;; # LibreSSL 2606 200*) ;; # LibreSSL
2606 *) 2607 *)
2607 AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")]) 2608 AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")])
2608 ;; 2609 ;;
2609 esac 2610 esac
2610 AC_MSG_RESULT([$ssl_library_ver]) 2611 AC_MSG_RESULT([$ssl_library_ver])
@@ -2777,6 +2778,115 @@ if test "x$openssl" = "xyes" ; then
2777 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], 2778 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1],
2778 [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) 2779 [Define if libcrypto has EVP_CIPHER_CTX_ctrl])])
2779 2780
2781 # LibreSSL/OpenSSL 1.1x API
2782 AC_SEARCH_LIBS([DH_get0_key], [crypto],
2783 [AC_DEFINE([HAVE_DH_GET0_KEY], [1],
2784 [Define if libcrypto has DH_get0_key])])
2785 AC_SEARCH_LIBS([DH_get0_pqg], [crypto],
2786 [AC_DEFINE([HAVE_DH_GET0_PQG], [1],
2787 [Define if libcrypto has DH_get0_pqg])])
2788 AC_SEARCH_LIBS([DH_set0_key], [crypto],
2789 [AC_DEFINE([HAVE_DH_SET0_KEY], [1],
2790 [Define if libcrypto has DH_set0_key])])
2791 AC_SEARCH_LIBS([DH_set_length], [crypto],
2792 [AC_DEFINE([HAVE_DH_SET_LENGTH], [1],
2793 [Define if libcrypto has DH_set_length])])
2794 AC_SEARCH_LIBS([DH_set0_pqg], [crypto],
2795 [AC_DEFINE([HAVE_DH_SET0_PQG], [1],
2796 [Define if libcrypto has DH_set0_pqg])])
2797
2798 AC_SEARCH_LIBS([DSA_get0_key], [crypto],
2799 [AC_DEFINE([HAVE_DSA_GET0_KEY], [1],
2800 [Define if libcrypto has DSA_get0_key])])
2801 AC_SEARCH_LIBS([DSA_get0_pqg], [crypto],
2802 [AC_DEFINE([HAVE_DSA_GET0_PQG], [1],
2803 [Define if libcrypto has DSA_get0_pqg])])
2804 AC_SEARCH_LIBS([DSA_set0_key], [crypto],
2805 [AC_DEFINE([HAVE_DSA_SET0_KEY], [1],
2806 [Define if libcrypto has DSA_set0_key])])
2807 AC_SEARCH_LIBS([DSA_set0_pqg], [crypto],
2808 [AC_DEFINE([HAVE_DSA_SET0_PQG], [1],
2809 [Define if libcrypto has DSA_set0_pqg])])
2810
2811 AC_SEARCH_LIBS([DSA_SIG_get0], [crypto],
2812 [AC_DEFINE([HAVE_DSA_SIG_GET0], [1],
2813 [Define if libcrypto has DSA_SIG_get0])])
2814 AC_SEARCH_LIBS([DSA_SIG_set0], [crypto],
2815 [AC_DEFINE([HAVE_DSA_SIG_SET0], [1],
2816 [Define if libcrypto has DSA_SIG_set0])])
2817
2818 AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto],
2819 [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1],
2820 [Define if libcrypto has ECDSA_SIG_get0])])
2821 AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto],
2822 [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1],
2823 [Define if libcrypto has ECDSA_SIG_set0])])
2824
2825 AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto],
2826 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1],
2827 [Define if libcrypto has EVP_CIPHER_CTX_iv])])
2828 AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto],
2829 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1],
2830 [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])])
2831 AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto],
2832 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
2833 [Define if libcrypto has EVP_CIPHER_CTX_get_iv])])
2834 AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto],
2835 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
2836 [Define if libcrypto has EVP_CIPHER_CTX_set_iv])])
2837
2838 AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto],
2839 [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1],
2840 [Define if libcrypto has RSA_get0_crt_params])])
2841 AC_SEARCH_LIBS([RSA_get0_factors], [crypto],
2842 [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1],
2843 [Define if libcrypto has RSA_get0_factors])])
2844 AC_SEARCH_LIBS([RSA_get0_key], [crypto],
2845 [AC_DEFINE([HAVE_RSA_GET0_KEY], [1],
2846 [Define if libcrypto has RSA_get0_key])])
2847 AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto],
2848 [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1],
2849 [Define if libcrypto has RSA_get0_srt_params])])
2850 AC_SEARCH_LIBS([RSA_set0_factors], [crypto],
2851 [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1],
2852 [Define if libcrypto has RSA_set0_factors])])
2853 AC_SEARCH_LIBS([RSA_set0_key], [crypto],
2854 [AC_DEFINE([HAVE_RSA_SET0_KEY], [1],
2855 [Define if libcrypto has RSA_set0_key])])
2856
2857 AC_SEARCH_LIBS([RSA_meth_free], [crypto],
2858 [AC_DEFINE([HAVE_RSA_METH_FREE], [1],
2859 [Define if libcrypto has RSA_meth_free])])
2860 AC_SEARCH_LIBS([RSA_meth_dup], [crypto],
2861 [AC_DEFINE([HAVE_RSA_METH_DUP], [1],
2862 [Define if libcrypto has RSA_meth_dup])])
2863 AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto],
2864 [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1],
2865 [Define if libcrypto has RSA_meth_set1_name])])
2866 AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto],
2867 [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1],
2868 [Define if libcrypto has RSA_meth_get_finish])])
2869 AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto],
2870 [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1],
2871 [Define if libcrypto has RSA_meth_set_priv_enc])])
2872 AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto],
2873 [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1],
2874 [Define if libcrypto has RSA_meth_set_priv_dec])])
2875 AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto],
2876 [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1],
2877 [Define if libcrypto has RSA_meth_set_finish])])
2878
2879 AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto],
2880 [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1],
2881 [Define if libcrypto has EVP_PKEY_get0_RSA])])
2882
2883 AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto],
2884 [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1],
2885 [Define if libcrypto has EVP_MD_CTX_new])])
2886 AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto],
2887 [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1],
2888 [Define if libcrypto has EVP_MD_CTX_free])])
2889
2780 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) 2890 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2781 AC_LINK_IFELSE( 2891 AC_LINK_IFELSE(
2782 [AC_LANG_PROGRAM([[ 2892 [AC_LANG_PROGRAM([[