summaryrefslogtreecommitdiffstats
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 83e53075..c0e120fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2602,9 +2602,10 @@ if test "x$openssl" = "xyes" ; then
AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
;;
100*) ;; # 1.0.x
+ 101*) ;; # 1.1.x
200*) ;; # LibreSSL
*)
- AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")])
+ AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")])
;;
esac
AC_MSG_RESULT([$ssl_library_ver])
@@ -2777,6 +2778,115 @@ if test "x$openssl" = "xyes" ; then
[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_GET_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([[