Skip to content

Use Windows system certificate store for CLI TLS transport#1351

Merged
RemiBou merged 2 commits into
masterfrom
bugfix/issue-3141-windows-system-cert-pool
Jun 3, 2026
Merged

Use Windows system certificate store for CLI TLS transport#1351
RemiBou merged 2 commits into
masterfrom
bugfix/issue-3141-windows-system-cert-pool

Conversation

@RemiBou
Copy link
Copy Markdown
Contributor

@RemiBou RemiBou commented Jun 3, 2026

Summary

  • When x509.SystemCertPool() returns a nil pool (notably on Windows), fall back to x509.NewCertPool() so TLS transport setup never passes a nil RootCAs pool.
  • Consolidate platform-specific loadSystemRoots helpers into a single implementation using SystemCertPool.
  • Remove the obsolete comment in loader.go and add unit tests for cert pool loading and transport configuration.

Based on Cesar-DC/jfrog-client-go@bugfix-issue-3141, discussed in jfrog/jfrog-cli#3441. Related to jfrog/jfrog-cli#2309.

Test plan

  • go test ./auth/cert/...
  • Verify TLS connectivity on Windows against a host using the OS trust store

Made with Cursor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


remib seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Co-authored-by: Cesar-DC <21956449+Cesar-DC@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@RemiBou RemiBou force-pushed the bugfix/issue-3141-windows-system-cert-pool branch from 08bdaf3 to ea31c9e Compare June 3, 2026 09:28
@RemiBou RemiBou deployed to frogbot June 3, 2026 09:28 — with GitHub Actions Active
@RemiBou RemiBou added the safe to test Approve running integration tests on a pull request label Jun 3, 2026
)

func loadSystemRoots() (*x509.CertPool, error) {
pool, err := x509.SystemCertPool()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to return err early if there is one?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

👍 Frogbot scanned this pull request and did not find any new security issues.


…or return

Co-authored-by: Cesar-DC <21956449+Cesar-DC@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@RemiBou RemiBou added safe to test Approve running integration tests on a pull request and removed safe to test Approve running integration tests on a pull request labels Jun 3, 2026
@RemiBou RemiBou enabled auto-merge (squash) June 3, 2026 12:58
@RemiBou RemiBou merged commit af1dd44 into master Jun 3, 2026
28 of 30 checks passed
@RemiBou RemiBou deleted the bugfix/issue-3141-windows-system-cert-pool branch June 3, 2026 13:05
@RemiBou RemiBou changed the title Handle nil SystemCertPool on Windows for TLS transport Use Windows system certificate store for CLI TLS transport Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants