Check for and config for the ca cert bundle properly when built with GnuTLS.

Previously this was only done for OpenSSL builds.
This commit is contained in:
Daniel Stenberg
2005-04-19 22:23:37 +00:00
parent 313f1a1e83
commit 779ca09775

View File

@@ -891,11 +891,6 @@ if test X"$OPT_SSL" != Xno; then
fi fi
fi fi
dnl **********************************************************************
dnl Check for the CA bundle
dnl **********************************************************************
if test X"$OPENSSL_ENABLED" = X"1"; then if test X"$OPENSSL_ENABLED" = X"1"; then
dnl If the ENGINE library seems to be around, check for the OpenSSL engine dnl If the ENGINE library seems to be around, check for the OpenSSL engine
dnl stuff, it is kind of "separated" from the main SSL check dnl stuff, it is kind of "separated" from the main SSL check
@@ -905,30 +900,6 @@ dnl **********************************************************************
AC_CHECK_FUNCS( ENGINE_load_builtin_engines ) AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
]) ])
AC_MSG_CHECKING([CA cert bundle install path])
AC_ARG_WITH(ca-bundle,
AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as])
AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
[ ca="$withval" ],
[
if test "x$prefix" != xNONE; then
ca="\${prefix}/share/curl/curl-ca-bundle.crt"
else
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
fi
] )
if test X"$OPT_SSL" = Xno; then
ca="no"
fi
if test "x$ca" != "xno"; then
CURL_CA_BUNDLE='"'$ca'"'
AC_SUBST(CURL_CA_BUNDLE)
fi
AC_MSG_RESULT([$ca])
dnl these can only exist if openssl exists dnl these can only exist if openssl exists
AC_CHECK_FUNCS( RAND_status \ AC_CHECK_FUNCS( RAND_status \
@@ -948,8 +919,6 @@ AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
fi fi
AM_CONDITIONAL(CABUNDLE, test x$ca != xno)
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the random seed preferences dnl Check for the random seed preferences
dnl ********************************************************************** dnl **********************************************************************
@@ -1059,6 +1028,38 @@ if test "$OPENSSL_ENABLED" != "1"; then
fi dnl OPENSSL != 1 fi dnl OPENSSL != 1
dnl **********************************************************************
dnl Check for the CA bundle
dnl **********************************************************************
if test X"$USE_GNUTLS$OPENSSL_ENABLED" != "X"; then
AC_MSG_CHECKING([CA cert bundle install path])
AC_ARG_WITH(ca-bundle,
AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as])
AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
[ ca="$withval" ],
[
if test "x$prefix" != xNONE; then
ca="\${prefix}/share/curl/curl-ca-bundle.crt"
else
ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
fi
] )
if test "x$ca" != "xno"; then
CURL_CA_BUNDLE='"'$ca'"'
AC_SUBST(CURL_CA_BUNDLE)
fi
AC_MSG_RESULT([$ca])
fi dnl only done if some kind of SSL was enabled
AM_CONDITIONAL(CABUNDLE, test x$ca != xno)
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the presence of ZLIB libraries and headers dnl Check for the presence of ZLIB libraries and headers
dnl ********************************************************************** dnl **********************************************************************
@@ -1797,4 +1798,5 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
Built-in manual: ${curl_manual_msg} Built-in manual: ${curl_manual_msg}
Verbose errors: ${curl_verbose_msg} Verbose errors: ${curl_verbose_msg}
SSPI support: ${curl_sspi_msg} SSPI support: ${curl_sspi_msg}
ca cert path: ${ca}
]) ])