Fix stale subject-hash headers; add verify guard + example.com/.org anchor test#5
Merged
Merged
Conversation
The `# OpenSSL subject hash:` comment in every roots/*.pem was wrong (written by an older hash implementation and never regenerated). The headers are informational — build.rs recomputes the hash from DER, so the compiled store and README were always correct — but the stale comments were misleading (e.g. SSL.com TLS ECC Root CA 2022 read `8b682d02` instead of the correct `865fbdf9`). - Rewrite all 117 headers to the computed hash. - cacrt-tool verify now fails when a header hash != the computed hash, so the comments can't silently rot again (CI runs verify). - Add tests/example_anchor.rs: resolve the SSL.com TLS ECC Root CA 2022 trust anchor (865fbdf9.0) by the issuer Name that example.com / example.org's chain points at, asserting byte-exact DER identity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
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.
What
Investigating a report that SSL.com TLS ECC Root CA 2022 might be missing, it turned out the root is present and correctly compiled (
865fbdf9.0) — but the# OpenSSL subject hash:comment in its PEM header was wrong (8b682d02), which is what made it look absent. Checking the rest of the store, all 117 PEM headers had a wrong subject-hash comment.These comments are informational only:
build.rsrecomputes the hash from DER, so the compiled store, the README tables, and thesubject_hash_matches_opensslcrosscheck were always correct. The headers were written by an older hash implementation and never regenerated.Changes
roots/*.pemheaders to the correct computed hash.cacrt-tool verifynow fails when a header's declared hash != the computed hash, so the comments can't silently drift again (CI runsverify).tests/example_anchor.rs: resolves the SSL.com TLS ECC Root CA 2022 trust anchor by the issuerNamethat example.com / example.org's chain points at (captured from the live chain), asserting byte-exact DER identity and reachability vialookup("865fbdf9.0"). example.com/.org now chain to this root, which motivated the investigation.Verification
cargo test— all pass (including the 2 new anchor tests).cacrt-tool verify—verified 117 roots, all pass curation rules; confirmed it now fails on a deliberately corrupted header.🤖 Generated with Claude Code