Repository navigation
caddy: use only the system CA store - #576534
Merged
Merged
Conversation
Caddy imports golang.org/x/crypto/x509roots/fallback in cmd/x509rootsfallback.go. That bundle contains the eMudhra emSign roots, including emSign ECC Root CA - G3. Go uses it when no system roots load, for example in a container without /etc/ssl. It does not get cacert updates. Remove the import, so that TLS uses only the system CA store. Also do this for caddy.withPlugins, where caddy is in the vendor directory. Assisted-by: Claude Code (claude-opus-5)
✅
|
stepbrobd
approved these changes
Oct 21, 2026
Contributor
|
Successfully created backport PR for |
4 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caddy imports golang.org/x/crypto/x509roots/fallback in cmd/x509rootsfallback.go. That bundle contains the eMudhra emSign roots, including emSign ECC Root CA - G3. Go uses it when no system roots load, for example in a container without /etc/ssl. It does not get cacert updates.
Remove the import, so that TLS uses only the system CA store. Also do this for caddy.withPlugins, where caddy is in the vendor directory. The file is removed in postConfigure, which goModules does not run, so vendorHash does not change.
Tested on x86_64-linux, plain and with a plugin (
replace-response):caddy reverse-proxy --to https://example.comwith SSL_CERT_FILE and SSL_CERT_DIR pointing to missing paths: the old binaries answer 200 through the fallback bundle; the new binaries answer 502 (x509: certificate signed by unknown authority). With the system bundle both answer 200.Note: the hash in plugins.test.nix is already out of date on master before this change; it is not touched here.
Related to: #576485
Related to: #576544
Assisted-by: Claude Code (claude-opus-5)
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.