microsoft / microsoft/WSL

`CollectTrustedRootCertificatesPem` doesn't take Intermediate CA

Open
#41,220 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature wslc
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

10.0.26100.33158

### WSL Version

2.9.4.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

6.18.35.2-1

### Distro Version

_No response_

### Other Software

_No response_

### Repro Steps

* Have the following PKI
```
ROOT ÇA
\ INTERMEDIATE CA
\ CERTIFICATE [docker.mycorp]
```
* have a docker repository that serves the HTTP endpoint using `docker.mycorp`
* on the windows host, have the ROOT CA in 'Trusted Root Certification Authorities' and the INTERMEDIATE CA in 'Intermediate Certification Authorities'
* `docker pull docker.mycorp/hello_world:latest`

### Expected Behavior

It works.

### Actual Behavior

The x509 certificate is rejected because intermediate certificates aren't also imported by `CollectTrustedRootCertificatesPem`. This can be an issue in an enterprise environment where those are populated automatically. Maybe the intermediate certificates should be included also ?

I can workaround the issue by adding the intermediate CA to "Trusted Root" and restarting.

### Diagnostic Logs

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported Docker pull reproduction and trace the CollectTrustedRootCertificatesPem entry point, focusing on how Windows Trusted Root Certification Authorities and Intermediate Certification Authorities are handled. Done means docker.mycorp/hello_world:latest pulls successfully when the root and intermediate certificates are stored in their respective Windows certificate stores.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.