Repository navigation
fix: add a private CA to the system store, not SSL_CERT_FILE alone; cache the CA layer - #959
Merged
Merged
Conversation
…ache the CA layer `SSL_CERT_FILE` and `SSL_CERT_DIR` replace the system store rather than add to it, and in the default image embedded ethrex's native-tls clients read them too, with no compiled-in roots to fall back on. The docs and the Dockerfile suggested naming a private CA with `SSL_CERT_FILE`, which, with a file holding that CA alone, leaves ethrex unable to reach any public endpoint: #944 again. They now say to add the CA to the system store (`update-ca-certificates`), or to name a copy of the whole bundle with it appended. The `ca-certificates` RUN came after `ARG GIT_COMMIT`, `GIT_BRANCH` and `VERSION`, which Docker passes to every later RUN as environment, so every new commit invalidated the layer and ran apt-get again. It now comes before them.
pablodeymo
approved these changes
Dec 2, 2026
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.
🗒️ Description / Motivation
Follow-up to #947, which merged before these two review findings were pushed.
docs/cli.mdand theDockerfilecomment suggested naming a private CA withSSL_CERT_FILE. That variable (andSSL_CERT_DIR) replaces the system store rather than adding to it. In the default image, embedded ethrex's native-tls (OpenSSL) clients read it too, and they have no compiled-in roots to fall back on. An operator who pointed it at a file holding only their CA would leave ethrex unable to reach any public HTTPS endpoint, the include-ethrex builds switch reqwest to native-tls, so the default Docker image cannot make HTTPS requests #944 symptom again. ethlambda's own rustls clients were fine, since they keep the webpki roots.ca-certificateslayer was never cached. TheRUN apt-getcame afterARG GIT_COMMIT,GIT_BRANCHandVERSION. Docker passes ARGs in scope to every laterRUNas environment, so every new commit invalidated the layer and ranapt-get updateagainst the mirrors again.What Changed
docs/cli.md(Web3Signer TLS paragraph): a private CA goes into the system store (on Debian/Ubuntu, the image included, a certificate under/usr/local/share/ca-certificates/plusupdate-ca-certificates).SSL_CERT_FILE/SSL_CERT_DIRmust name a copy of the whole store with the CA added, never the CA alone, and the paragraph says why.Dockerfile: the same advice in the CA-store comment, and theca-certificatesRUNmoved above the threeARGs, with a line on why it has to stay there.Correctness / Behavior Guarantees
SSL_CERT_FILEbehavior described is rustls-native-certs 0.8's (load_native_certsreads only the env paths once either is set) and OpenSSL's default verify paths.Tests Added / Run
Related Issues / PRs
✅ Verification Checklist
make fmt— n/a, no Rust changemake lint— n/a, no Rust changemake test— n/a, no Rust change