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

@ -1149,6 +1149,12 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
capath_warning=" (warning: certs not found)"
check_capath=""
if test "x$APPLE_SECTRUST_ENABLED" = "x1"; then
ca_native="Apple SecTrust"
else
ca_native="no"
fi
if test "x$want_ca" != "xno" -a "x$want_ca" != "xunset" -a \
"x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then
dnl both given
@ -1162,6 +1168,10 @@ AS_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
dnl --with-ca-path given
capath="$want_capath"
ca="no"
elif test "x$ca_native" != "xno"; then
# native ca configured, do not look further
ca="no"
capath="no"
else
dnl First try auto-detecting a CA bundle, then a CA path.
dnl Both auto-detections can be skipped by --without-ca-*