Skip to content

Commit

Permalink
crypto: add support for intermediate certs in --use-system-ca
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Feb 21, 2025
1 parent 772c609 commit 6250353
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/crypto/crypto_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,22 @@ void ReadWindowsCertificates(
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
L"ROOT");

// Grab the intermediate certs
GatherCertsForLocation(
system_root_certificates_X509, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"CA");
GatherCertsForLocation(system_root_certificates_X509,
CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY,
L"CA");
GatherCertsForLocation(system_root_certificates_X509,
CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE,
L"CA");
GatherCertsForLocation(
system_root_certificates_X509, CERT_SYSTEM_STORE_CURRENT_USER, L"CA");
GatherCertsForLocation(system_root_certificates_X509,
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
L"CA");


// Grab the user-added trusted server certs. Trusted end-entity certs are
// only allowed for server auth in the "local machine" store, but not in the
// "current user" store.
Expand Down

0 comments on commit 6250353

Please sign in to comment.