summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2018-10-19 21:29:01 +0100
committerColin Watson <cjwatson@debian.org>2018-10-20 22:54:15 +0100
commitd80ebbf028196b2478beebf5a290b97f35e1eed9 (patch)
tree6666a5484923a26738675ff27a6186cfe15d4cad /configure.ac
parent4f5bbf3f11efeec65bbd56464b20a19bd250e5cc (diff)
parent1d2a55436d4b556269f42ad5f7e16608b5a8ed74 (diff)
New upstream release (7.9p1)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac162
1 files changed, 145 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index dab138640..8a5db4cb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,15 +164,6 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
164 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result]) 164 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result])
165 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) 165 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
166 if test "x$use_toolchain_hardening" = "x1"; then 166 if test "x$use_toolchain_hardening" = "x1"; then
167 # Cygwin GCC 7.x allows thunking on the CLI, but produces non-working
168 # code. Unfortunately you only notice this at link time.
169 case "$host" in
170 *-*-cygwin*) ;;
171 *)
172 OSSH_CHECK_CFLAG_COMPILE([-mfunction-return=thunk]) # gcc
173 OSSH_CHECK_CFLAG_COMPILE([-mindirect-branch=thunk]) # gcc
174 ;;
175 esac
176 OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang 167 OSSH_CHECK_CFLAG_COMPILE([-mretpoline]) # clang
177 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt]) 168 OSSH_CHECK_LDFLAG_LINK([-Wl,-z,retpolineplt])
178 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2]) 169 OSSH_CHECK_CFLAG_COMPILE([-D_FORTIFY_SOURCE=2])
@@ -2190,6 +2181,29 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then
2190 ) 2181 )
2191fi 2182fi
2192 2183
2184if test "x$ac_cv_func_snprintf" = "xyes" ; then
2185 AC_MSG_CHECKING([whether snprintf understands %zu])
2186 AC_RUN_IFELSE(
2187 [AC_LANG_PROGRAM([[
2188#include <sys/types.h>
2189#include <stdio.h>
2190 ]],
2191 [[
2192 size_t a = 1, b = 2;
2193 char z[128];
2194 snprintf(z, sizeof z, "%zu%zu", a, b);
2195 exit(strcmp(z, "12"));
2196 ]])],
2197 [AC_MSG_RESULT([yes])],
2198 [
2199 AC_MSG_RESULT([no])
2200 AC_DEFINE([BROKEN_SNPRINTF], [1],
2201 [snprintf does not understand %zu])
2202 ],
2203 [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ]
2204 )
2205fi
2206
2193# We depend on vsnprintf returning the right thing on overflow: the 2207# We depend on vsnprintf returning the right thing on overflow: the
2194# number of characters it tried to create (as per SUSv3) 2208# number of characters it tried to create (as per SUSv3)
2195if test "x$ac_cv_func_vsnprintf" = "xyes" ; then 2209if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
@@ -2678,14 +2692,19 @@ if test "x$openssl" = "xyes" ; then
2678 ssl_library_ver=`cat conftest.ssllibver` 2692 ssl_library_ver=`cat conftest.ssllibver`
2679 # Check version is supported. 2693 # Check version is supported.
2680 case "$ssl_library_ver" in 2694 case "$ssl_library_ver" in
2681 10000*|0*) 2695 10000*|0*)
2682 AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")]) 2696 AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")])
2683 ;; 2697 ;;
2684 100*) ;; # 1.0.x 2698 100*) ;; # 1.0.x
2685 200*) ;; # LibreSSL 2699 101000[0123456]*)
2686 *) 2700 # https://github.com/openssl/openssl/pull/4613
2687 AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")]) 2701 AC_MSG_ERROR([OpenSSL 1.1.x versions prior to 1.1.0g have a bug that breaks their use with OpenSSH (have "$ssl_library_ver")])
2688 ;; 2702 ;;
2703 101*) ;; # 1.1.x
2704 200*) ;; # LibreSSL
2705 *)
2706 AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")])
2707 ;;
2689 esac 2708 esac
2690 AC_MSG_RESULT([$ssl_library_ver]) 2709 AC_MSG_RESULT([$ssl_library_ver])
2691 ], 2710 ],
@@ -2857,6 +2876,115 @@ if test "x$openssl" = "xyes" ; then
2857 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], 2876 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1],
2858 [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) 2877 [Define if libcrypto has EVP_CIPHER_CTX_ctrl])])
2859 2878
2879 # LibreSSL/OpenSSL 1.1x API
2880 AC_SEARCH_LIBS([DH_get0_key], [crypto],
2881 [AC_DEFINE([HAVE_DH_GET0_KEY], [1],
2882 [Define if libcrypto has DH_get0_key])])
2883 AC_SEARCH_LIBS([DH_get0_pqg], [crypto],
2884 [AC_DEFINE([HAVE_DH_GET0_PQG], [1],
2885 [Define if libcrypto has DH_get0_pqg])])
2886 AC_SEARCH_LIBS([DH_set0_key], [crypto],
2887 [AC_DEFINE([HAVE_DH_SET0_KEY], [1],
2888 [Define if libcrypto has DH_set0_key])])
2889 AC_SEARCH_LIBS([DH_set_length], [crypto],
2890 [AC_DEFINE([HAVE_DH_SET_LENGTH], [1],
2891 [Define if libcrypto has DH_set_length])])
2892 AC_SEARCH_LIBS([DH_set0_pqg], [crypto],
2893 [AC_DEFINE([HAVE_DH_SET0_PQG], [1],
2894 [Define if libcrypto has DH_set0_pqg])])
2895
2896 AC_SEARCH_LIBS([DSA_get0_key], [crypto],
2897 [AC_DEFINE([HAVE_DSA_GET0_KEY], [1],
2898 [Define if libcrypto has DSA_get0_key])])
2899 AC_SEARCH_LIBS([DSA_get0_pqg], [crypto],
2900 [AC_DEFINE([HAVE_DSA_GET0_PQG], [1],
2901 [Define if libcrypto has DSA_get0_pqg])])
2902 AC_SEARCH_LIBS([DSA_set0_key], [crypto],
2903 [AC_DEFINE([HAVE_DSA_SET0_KEY], [1],
2904 [Define if libcrypto has DSA_set0_key])])
2905 AC_SEARCH_LIBS([DSA_set0_pqg], [crypto],
2906 [AC_DEFINE([HAVE_DSA_SET0_PQG], [1],
2907 [Define if libcrypto has DSA_set0_pqg])])
2908
2909 AC_SEARCH_LIBS([DSA_SIG_get0], [crypto],
2910 [AC_DEFINE([HAVE_DSA_SIG_GET0], [1],
2911 [Define if libcrypto has DSA_SIG_get0])])
2912 AC_SEARCH_LIBS([DSA_SIG_set0], [crypto],
2913 [AC_DEFINE([HAVE_DSA_SIG_SET0], [1],
2914 [Define if libcrypto has DSA_SIG_set0])])
2915
2916 AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto],
2917 [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1],
2918 [Define if libcrypto has ECDSA_SIG_get0])])
2919 AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto],
2920 [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1],
2921 [Define if libcrypto has ECDSA_SIG_set0])])
2922
2923 AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto],
2924 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1],
2925 [Define if libcrypto has EVP_CIPHER_CTX_iv])])
2926 AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto],
2927 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1],
2928 [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])])
2929 AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto],
2930 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
2931 [Define if libcrypto has EVP_CIPHER_CTX_get_iv])])
2932 AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto],
2933 [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1],
2934 [Define if libcrypto has EVP_CIPHER_CTX_set_iv])])
2935
2936 AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto],
2937 [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1],
2938 [Define if libcrypto has RSA_get0_crt_params])])
2939 AC_SEARCH_LIBS([RSA_get0_factors], [crypto],
2940 [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1],
2941 [Define if libcrypto has RSA_get0_factors])])
2942 AC_SEARCH_LIBS([RSA_get0_key], [crypto],
2943 [AC_DEFINE([HAVE_RSA_GET0_KEY], [1],
2944 [Define if libcrypto has RSA_get0_key])])
2945 AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto],
2946 [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1],
2947 [Define if libcrypto has RSA_get0_srt_params])])
2948 AC_SEARCH_LIBS([RSA_set0_factors], [crypto],
2949 [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1],
2950 [Define if libcrypto has RSA_set0_factors])])
2951 AC_SEARCH_LIBS([RSA_set0_key], [crypto],
2952 [AC_DEFINE([HAVE_RSA_SET0_KEY], [1],
2953 [Define if libcrypto has RSA_set0_key])])
2954
2955 AC_SEARCH_LIBS([RSA_meth_free], [crypto],
2956 [AC_DEFINE([HAVE_RSA_METH_FREE], [1],
2957 [Define if libcrypto has RSA_meth_free])])
2958 AC_SEARCH_LIBS([RSA_meth_dup], [crypto],
2959 [AC_DEFINE([HAVE_RSA_METH_DUP], [1],
2960 [Define if libcrypto has RSA_meth_dup])])
2961 AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto],
2962 [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1],
2963 [Define if libcrypto has RSA_meth_set1_name])])
2964 AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto],
2965 [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1],
2966 [Define if libcrypto has RSA_meth_get_finish])])
2967 AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto],
2968 [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1],
2969 [Define if libcrypto has RSA_meth_set_priv_enc])])
2970 AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto],
2971 [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1],
2972 [Define if libcrypto has RSA_meth_set_priv_dec])])
2973 AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto],
2974 [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1],
2975 [Define if libcrypto has RSA_meth_set_finish])])
2976
2977 AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto],
2978 [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1],
2979 [Define if libcrypto has EVP_PKEY_get0_RSA])])
2980
2981 AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto],
2982 [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1],
2983 [Define if libcrypto has EVP_MD_CTX_new])])
2984 AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto],
2985 [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1],
2986 [Define if libcrypto has EVP_MD_CTX_free])])
2987
2860 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) 2988 AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2861 AC_LINK_IFELSE( 2989 AC_LINK_IFELSE(
2862 [AC_LANG_PROGRAM([[ 2990 [AC_LANG_PROGRAM([[