]> git.ipfire.org Git - thirdparty/curl.git/commit
schannel: allow partial chains for manual peer verification
authorRod Widdowson <rdw@steadingsoftware.com>
Wed, 21 May 2025 19:10:36 +0000 (20:10 +0100)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 14 Jun 2025 22:55:08 +0000 (18:55 -0400)
commitdf1ff17f88a623b12c13ffd893ca4ac47c5f04d1
tree80c20ce106cc4a118bbd31fe8aed482f8c1ff9ee
parent49a0c27bbc1db80ce2353461934362480a4bf340
schannel: allow partial chains for manual peer verification

- Align --cacert behaviour with OpenSSL and LibreSSL.

This changes the default behavior of Schannel manual certificate
verification, which is used when the user provides their own CA
certificates for verification, to accept partial chains. In other words,
the user may provide an intermediate certificate without having to
provide the root CA.

Win8/Server2012 widened the PKIX chain traversal API to allow
certificate traversal to terminate at an intermediate.

This behaviour (terminate at the fist matching intermediate) is the
default for LibreSSL and OpenSSL (with OpenSSL allowing control via
CURLSSLOPT_NO_PARTIALCHAIN).

This change uses the new API if it is available, and also allows the
behaviour to revert legacy if CURLSSLOPT_NO_PARTIALCHAIN is present.

Closes https://github.com/curl/curl/pull/17418
docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.md
docs/libcurl/opts/CURLOPT_SSL_OPTIONS.md
lib/vtls/schannel_verify.c