diff options
author | Colin Watson <cjwatson@debian.org> | 2018-10-19 21:29:01 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-10-19 21:29:01 +0100 |
commit | 3d246f10429fc9a37b98eabef94fe8dc7c61002b (patch) | |
tree | 1f35b42b5e5f462d35ba452e4dcfa188ce0543fd /configure.ac | |
parent | e6547182a54f0f268ee36e7c99319eeddffbaff2 (diff) | |
parent | aede1c34243a6f7feae2fb2cb686ade5f9be6f3d (diff) |
Import openssh_7.9p1.orig.tar.gz
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 162 |
1 files changed, 145 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 83e530750..7379ab358 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]) |
@@ -2110,6 +2101,29 @@ if test "x$ac_cv_func_snprintf" = "xyes" ; then | |||
2110 | ) | 2101 | ) |
2111 | fi | 2102 | fi |
2112 | 2103 | ||
2104 | if test "x$ac_cv_func_snprintf" = "xyes" ; then | ||
2105 | AC_MSG_CHECKING([whether snprintf understands %zu]) | ||
2106 | AC_RUN_IFELSE( | ||
2107 | [AC_LANG_PROGRAM([[ | ||
2108 | #include <sys/types.h> | ||
2109 | #include <stdio.h> | ||
2110 | ]], | ||
2111 | [[ | ||
2112 | size_t a = 1, b = 2; | ||
2113 | char z[128]; | ||
2114 | snprintf(z, sizeof z, "%zu%zu", a, b); | ||
2115 | exit(strcmp(z, "12")); | ||
2116 | ]])], | ||
2117 | [AC_MSG_RESULT([yes])], | ||
2118 | [ | ||
2119 | AC_MSG_RESULT([no]) | ||
2120 | AC_DEFINE([BROKEN_SNPRINTF], [1], | ||
2121 | [snprintf does not understand %zu]) | ||
2122 | ], | ||
2123 | [ AC_MSG_WARN([cross compiling: Assuming working snprintf()]) ] | ||
2124 | ) | ||
2125 | fi | ||
2126 | |||
2113 | # We depend on vsnprintf returning the right thing on overflow: the | 2127 | # We depend on vsnprintf returning the right thing on overflow: the |
2114 | # number of characters it tried to create (as per SUSv3) | 2128 | # number of characters it tried to create (as per SUSv3) |
2115 | if test "x$ac_cv_func_vsnprintf" = "xyes" ; then | 2129 | if test "x$ac_cv_func_vsnprintf" = "xyes" ; then |
@@ -2598,14 +2612,19 @@ if test "x$openssl" = "xyes" ; then | |||
2598 | ssl_library_ver=`cat conftest.ssllibver` | 2612 | ssl_library_ver=`cat conftest.ssllibver` |
2599 | # Check version is supported. | 2613 | # Check version is supported. |
2600 | case "$ssl_library_ver" in | 2614 | case "$ssl_library_ver" in |
2601 | 10000*|0*) | 2615 | 10000*|0*) |
2602 | AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")]) | 2616 | AC_MSG_ERROR([OpenSSL >= 1.0.1 required (have "$ssl_library_ver")]) |
2603 | ;; | 2617 | ;; |
2604 | 100*) ;; # 1.0.x | 2618 | 100*) ;; # 1.0.x |
2605 | 200*) ;; # LibreSSL | 2619 | 101000[0123456]*) |
2606 | *) | 2620 | # https://github.com/openssl/openssl/pull/4613 |
2607 | AC_MSG_ERROR([OpenSSL >= 1.1.0 is not yet supported (have "$ssl_library_ver")]) | 2621 | 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")]) |
2608 | ;; | 2622 | ;; |
2623 | 101*) ;; # 1.1.x | ||
2624 | 200*) ;; # LibreSSL | ||
2625 | *) | ||
2626 | AC_MSG_ERROR([OpenSSL > 1.1.x is not yet supported (have "$ssl_library_ver")]) | ||
2627 | ;; | ||
2609 | esac | 2628 | esac |
2610 | AC_MSG_RESULT([$ssl_library_ver]) | 2629 | AC_MSG_RESULT([$ssl_library_ver]) |
2611 | ], | 2630 | ], |
@@ -2777,6 +2796,115 @@ if test "x$openssl" = "xyes" ; then | |||
2777 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], | 2796 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_CTRL], [1], |
2778 | [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) | 2797 | [Define if libcrypto has EVP_CIPHER_CTX_ctrl])]) |
2779 | 2798 | ||
2799 | # LibreSSL/OpenSSL 1.1x API | ||
2800 | AC_SEARCH_LIBS([DH_get0_key], [crypto], | ||
2801 | [AC_DEFINE([HAVE_DH_GET0_KEY], [1], | ||
2802 | [Define if libcrypto has DH_get0_key])]) | ||
2803 | AC_SEARCH_LIBS([DH_get0_pqg], [crypto], | ||
2804 | [AC_DEFINE([HAVE_DH_GET0_PQG], [1], | ||
2805 | [Define if libcrypto has DH_get0_pqg])]) | ||
2806 | AC_SEARCH_LIBS([DH_set0_key], [crypto], | ||
2807 | [AC_DEFINE([HAVE_DH_SET0_KEY], [1], | ||
2808 | [Define if libcrypto has DH_set0_key])]) | ||
2809 | AC_SEARCH_LIBS([DH_set_length], [crypto], | ||
2810 | [AC_DEFINE([HAVE_DH_SET_LENGTH], [1], | ||
2811 | [Define if libcrypto has DH_set_length])]) | ||
2812 | AC_SEARCH_LIBS([DH_set0_pqg], [crypto], | ||
2813 | [AC_DEFINE([HAVE_DH_SET0_PQG], [1], | ||
2814 | [Define if libcrypto has DH_set0_pqg])]) | ||
2815 | |||
2816 | AC_SEARCH_LIBS([DSA_get0_key], [crypto], | ||
2817 | [AC_DEFINE([HAVE_DSA_GET0_KEY], [1], | ||
2818 | [Define if libcrypto has DSA_get0_key])]) | ||
2819 | AC_SEARCH_LIBS([DSA_get0_pqg], [crypto], | ||
2820 | [AC_DEFINE([HAVE_DSA_GET0_PQG], [1], | ||
2821 | [Define if libcrypto has DSA_get0_pqg])]) | ||
2822 | AC_SEARCH_LIBS([DSA_set0_key], [crypto], | ||
2823 | [AC_DEFINE([HAVE_DSA_SET0_KEY], [1], | ||
2824 | [Define if libcrypto has DSA_set0_key])]) | ||
2825 | AC_SEARCH_LIBS([DSA_set0_pqg], [crypto], | ||
2826 | [AC_DEFINE([HAVE_DSA_SET0_PQG], [1], | ||
2827 | [Define if libcrypto has DSA_set0_pqg])]) | ||
2828 | |||
2829 | AC_SEARCH_LIBS([DSA_SIG_get0], [crypto], | ||
2830 | [AC_DEFINE([HAVE_DSA_SIG_GET0], [1], | ||
2831 | [Define if libcrypto has DSA_SIG_get0])]) | ||
2832 | AC_SEARCH_LIBS([DSA_SIG_set0], [crypto], | ||
2833 | [AC_DEFINE([HAVE_DSA_SIG_SET0], [1], | ||
2834 | [Define if libcrypto has DSA_SIG_set0])]) | ||
2835 | |||
2836 | AC_SEARCH_LIBS([ECDSA_SIG_get0], [crypto], | ||
2837 | [AC_DEFINE([HAVE_ECDSA_SIG_GET0], [1], | ||
2838 | [Define if libcrypto has ECDSA_SIG_get0])]) | ||
2839 | AC_SEARCH_LIBS([ECDSA_SIG_set0], [crypto], | ||
2840 | [AC_DEFINE([HAVE_ECDSA_SIG_SET0], [1], | ||
2841 | [Define if libcrypto has ECDSA_SIG_set0])]) | ||
2842 | |||
2843 | AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv], [crypto], | ||
2844 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV], [1], | ||
2845 | [Define if libcrypto has EVP_CIPHER_CTX_iv])]) | ||
2846 | AC_SEARCH_LIBS([EVP_CIPHER_CTX_iv_noconst], [crypto], | ||
2847 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_IV_NOCONST], [1], | ||
2848 | [Define if libcrypto has EVP_CIPHER_CTX_iv_noconst])]) | ||
2849 | AC_SEARCH_LIBS([EVP_CIPHER_CTX_get_iv], [crypto], | ||
2850 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1], | ||
2851 | [Define if libcrypto has EVP_CIPHER_CTX_get_iv])]) | ||
2852 | AC_SEARCH_LIBS([EVP_CIPHER_CTX_set_iv], [crypto], | ||
2853 | [AC_DEFINE([HAVE_EVP_CIPHER_CTX_GET_IV], [1], | ||
2854 | [Define if libcrypto has EVP_CIPHER_CTX_set_iv])]) | ||
2855 | |||
2856 | AC_SEARCH_LIBS([RSA_get0_crt_params], [crypto], | ||
2857 | [AC_DEFINE([HAVE_RSA_GET0_CRT_PARAMS], [1], | ||
2858 | [Define if libcrypto has RSA_get0_crt_params])]) | ||
2859 | AC_SEARCH_LIBS([RSA_get0_factors], [crypto], | ||
2860 | [AC_DEFINE([HAVE_RSA_GET0_FACTORS], [1], | ||
2861 | [Define if libcrypto has RSA_get0_factors])]) | ||
2862 | AC_SEARCH_LIBS([RSA_get0_key], [crypto], | ||
2863 | [AC_DEFINE([HAVE_RSA_GET0_KEY], [1], | ||
2864 | [Define if libcrypto has RSA_get0_key])]) | ||
2865 | AC_SEARCH_LIBS([RSA_set0_crt_params], [crypto], | ||
2866 | [AC_DEFINE([HAVE_RSA_SET0_CRT_PARAMS], [1], | ||
2867 | [Define if libcrypto has RSA_get0_srt_params])]) | ||
2868 | AC_SEARCH_LIBS([RSA_set0_factors], [crypto], | ||
2869 | [AC_DEFINE([HAVE_RSA_SET0_FACTORS], [1], | ||
2870 | [Define if libcrypto has RSA_set0_factors])]) | ||
2871 | AC_SEARCH_LIBS([RSA_set0_key], [crypto], | ||
2872 | [AC_DEFINE([HAVE_RSA_SET0_KEY], [1], | ||
2873 | [Define if libcrypto has RSA_set0_key])]) | ||
2874 | |||
2875 | AC_SEARCH_LIBS([RSA_meth_free], [crypto], | ||
2876 | [AC_DEFINE([HAVE_RSA_METH_FREE], [1], | ||
2877 | [Define if libcrypto has RSA_meth_free])]) | ||
2878 | AC_SEARCH_LIBS([RSA_meth_dup], [crypto], | ||
2879 | [AC_DEFINE([HAVE_RSA_METH_DUP], [1], | ||
2880 | [Define if libcrypto has RSA_meth_dup])]) | ||
2881 | AC_SEARCH_LIBS([RSA_meth_set1_name], [crypto], | ||
2882 | [AC_DEFINE([HAVE_RSA_METH_SET1_NAME], [1], | ||
2883 | [Define if libcrypto has RSA_meth_set1_name])]) | ||
2884 | AC_SEARCH_LIBS([RSA_meth_get_finish], [crypto], | ||
2885 | [AC_DEFINE([HAVE_RSA_METH_GET_FINISH], [1], | ||
2886 | [Define if libcrypto has RSA_meth_get_finish])]) | ||
2887 | AC_SEARCH_LIBS([RSA_meth_set_priv_enc], [crypto], | ||
2888 | [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_ENC], [1], | ||
2889 | [Define if libcrypto has RSA_meth_set_priv_enc])]) | ||
2890 | AC_SEARCH_LIBS([RSA_meth_set_priv_dec], [crypto], | ||
2891 | [AC_DEFINE([HAVE_RSA_METH_SET_PRIV_DEC], [1], | ||
2892 | [Define if libcrypto has RSA_meth_set_priv_dec])]) | ||
2893 | AC_SEARCH_LIBS([RSA_meth_set_finish], [crypto], | ||
2894 | [AC_DEFINE([HAVE_RSA_METH_SET_FINISH], [1], | ||
2895 | [Define if libcrypto has RSA_meth_set_finish])]) | ||
2896 | |||
2897 | AC_SEARCH_LIBS([EVP_PKEY_get0_RSA], [crypto], | ||
2898 | [AC_DEFINE([HAVE_EVP_PKEY_GET0_RSA], [1], | ||
2899 | [Define if libcrypto has EVP_PKEY_get0_RSA])]) | ||
2900 | |||
2901 | AC_SEARCH_LIBS([EVP_MD_CTX_new], [crypto], | ||
2902 | [AC_DEFINE([HAVE_EVP_MD_CTX_NEW], [1], | ||
2903 | [Define if libcrypto has EVP_MD_CTX_new])]) | ||
2904 | AC_SEARCH_LIBS([EVP_MD_CTX_free], [crypto], | ||
2905 | [AC_DEFINE([HAVE_EVP_MD_CTX_FREE], [1], | ||
2906 | [Define if libcrypto has EVP_MD_CTX_free])]) | ||
2907 | |||
2780 | AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) | 2908 | AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) |
2781 | AC_LINK_IFELSE( | 2909 | AC_LINK_IFELSE( |
2782 | [AC_LANG_PROGRAM([[ | 2910 | [AC_LANG_PROGRAM([[ |