mirror of
https://github.com/curl/curl.git
synced 2025-09-14 16:12:43 +03:00
configure: check for the capath by default
... if the chosen TLS backend supports it: OpenSSL, GnuTLS, mbedTLS or wolfSSL cmake: synced Assisted-by: Viktor Szakats Closes #11987
This commit is contained in:
parent
463528b0f8
commit
849bd50cc9
|
@ -1011,9 +1011,13 @@ elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS)
|
if(CURL_CA_PATH_SET AND
|
||||||
|
NOT USE_OPENSSL AND
|
||||||
|
NOT USE_WOLFSSL AND
|
||||||
|
NOT USE_GNUTLS AND
|
||||||
|
NOT USE_MBEDTLS)
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"CA path only supported by OpenSSL, GnuTLS or mbed TLS. "
|
"CA path only supported by OpenSSL, wolfSSL, GnuTLS or mbedTLS. "
|
||||||
"Set CURL_CA_PATH=none or enable one of those TLS backends.")
|
"Set CURL_CA_PATH=none or enable one of those TLS backends.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
20
acinclude.m4
20
acinclude.m4
|
@ -1469,7 +1469,7 @@ AS_HELP_STRING([--without-ca-bundle], [Don't use a default CA bundle]),
|
||||||
AS_HELP_STRING([--with-ca-path=DIRECTORY],
|
AS_HELP_STRING([--with-ca-path=DIRECTORY],
|
||||||
[Path to a directory containing CA certificates stored individually, with \
|
[Path to a directory containing CA certificates stored individually, with \
|
||||||
their filenames in a hash format. This option can be used with the OpenSSL, \
|
their filenames in a hash format. This option can be used with the OpenSSL, \
|
||||||
GnuTLS and mbedTLS backends. Refer to OpenSSL c_rehash for details. \
|
GnuTLS, mbedTLS and wolfSSL backends. Refer to OpenSSL c_rehash for details. \
|
||||||
(example: /etc/certificates)])
|
(example: /etc/certificates)])
|
||||||
AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||||
[
|
[
|
||||||
|
@ -1495,8 +1495,11 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||||
capath="no"
|
capath="no"
|
||||||
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
|
elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
|
||||||
dnl --with-ca-path given
|
dnl --with-ca-path given
|
||||||
if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$MBEDTLS_ENABLED" != "x1"; then
|
if test "x$OPENSSL_ENABLED" != "x1" -a \
|
||||||
AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or mbedTLS])
|
"x$GNUTLS_ENABLED" != "x1" -a \
|
||||||
|
"x$MBEDTLS_ENABLED" != "x1" -a \
|
||||||
|
"x$WOLFSSL_ENABLED" != "x1"; then
|
||||||
|
AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS, mbedTLS or wolfSSL])
|
||||||
fi
|
fi
|
||||||
capath="$want_capath"
|
capath="$want_capath"
|
||||||
ca="no"
|
ca="no"
|
||||||
|
@ -1530,9 +1533,14 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if test "x$want_capath" = "xunset" -a "x$ca" = "xno" -a \
|
AC_MSG_NOTICE([want $want_capath ca $ca])
|
||||||
"x$OPENSSL_ENABLED" = "x1"; then
|
if test "x$want_capath" = "xunset"; then
|
||||||
check_capath="/etc/ssl/certs/"
|
if test "x$OPENSSL_ENABLED" = "x1" -o \
|
||||||
|
"x$GNUTLS_ENABLED" = "x1" -o \
|
||||||
|
"x$MBEDTLS_ENABLED" = "x1" -o \
|
||||||
|
"x$WOLFSSL_ENABLED" = "x1"; then
|
||||||
|
check_capath="/etc/ssl/certs/"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dnl no option given and cross-compiling
|
dnl no option given and cross-compiling
|
||||||
|
|
Loading…
Reference in New Issue
Block a user