Skip to content

Commit 6250353

Browse files
committed
crypto: add support for intermediate certs in --use-system-ca
1 parent 772c609 commit 6250353

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/crypto/crypto_context.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,22 @@ void ReadWindowsCertificates(
630630
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
631631
L"ROOT");
632632

633+
// Grab the intermediate certs
634+
GatherCertsForLocation(
635+
system_root_certificates_X509, CERT_SYSTEM_STORE_LOCAL_MACHINE, L"CA");
636+
GatherCertsForLocation(system_root_certificates_X509,
637+
CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY,
638+
L"CA");
639+
GatherCertsForLocation(system_root_certificates_X509,
640+
CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE,
641+
L"CA");
642+
GatherCertsForLocation(
643+
system_root_certificates_X509, CERT_SYSTEM_STORE_CURRENT_USER, L"CA");
644+
GatherCertsForLocation(system_root_certificates_X509,
645+
CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY,
646+
L"CA");
647+
648+
633649
// Grab the user-added trusted server certs. Trusted end-entity certs are
634650
// only allowed for server auth in the "local machine" store, but not in the
635651
// "current user" store.

0 commit comments

Comments
 (0)