ssl: support Apple SecTrust configurations

- configure/cmake support for enabling the option
- supported in OpenSSL and GnuTLS backends
- when configured, Apple SecTrust is the default trust store
  for peer verification. When one of the CURLOPT_* for adding
  certificates is used, that default does not apply.
- add documentation of build options and SSL use

Closes #18703
This commit is contained in:
Stefan Eissing 2025-09-24 10:19:46 +02:00 committed by Daniel Stenberg
parent 9cc1ee55a4
commit eefd03c572
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
29 changed files with 1377 additions and 604 deletions

View file

@ -277,6 +277,12 @@ AS_HELP_STRING([--with-rustls=PATH],[where to look for Rustls, PATH points to th
fi
])
OPT_APPLE_SECTRUST=$curl_cv_apple
AC_ARG_WITH(apple-sectrust,dnl
AS_HELP_STRING([--with-apple-sectrust],[enable Apple OS native certificate verification]),[
OPT_APPLE_SECTRUST=$withval
])
AC_PATH_PROG(PERL, perl,, $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin)
AC_SUBST(PERL)
AM_CONDITIONAL(PERL, test -n "$PERL")
@ -2016,6 +2022,7 @@ CURL_WITH_GNUTLS
CURL_WITH_MBEDTLS
CURL_WITH_WOLFSSL
CURL_WITH_RUSTLS
CURL_WITH_APPLE_SECTRUST
dnl link required libraries for USE_WIN32_CRYPTO or SCHANNEL_ENABLED
if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$SCHANNEL_ENABLED" = "x1"; then
@ -5588,6 +5595,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
Verbose errors: ${curl_verbose_msg}
Code coverage: ${curl_coverage_msg}
SSPI: ${curl_sspi_msg}
ca native: ${ca_native}
ca cert bundle: ${ca}${ca_warning}
ca cert path: ${capath}${capath_warning}
ca cert embed: ${CURL_CA_EMBED_msg}