Repository navigation
clazel-x509: Mozilla root trust store generated from NSS certdata.txt - #15
Merged
Merged
Conversation
atiernan
added a commit
that referenced
this pull request
Oct 26, 2026
`the_decode_check_can_fail` leaked a Vec to build a `&'static` Root, which Miri reports as a memory leak (#15, Verify (base, macOS)). decode_failure now takes the DER slice, so the damaged copy stays an owned Vec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
marked this pull request as ready for review
October 27, 2026 11:04
Byte for byte, with SOURCE.md (URLs, commit, size, SHA-256, update procedure) and the MPL-2.0 licence text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cargo xtask tables converts the vendored NSS file into clazel_x509::roots (118 TLS server roots, with label, DER, SHA-256 and the server distrust-after date). cargo xtask check fails if the table is stale or the vendored file's hash differs from SOURCE.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Document the table, its modelling choices and the update procedure. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`the_decode_check_can_fail` leaked a Vec to build a `&'static` Root, which Miri reports as a memory leak (#15, Verify (base, macOS)). decode_failure now takes the DER slice, so the damaged copy stays an owned Vec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
force-pushed
the
phase3/roots
branch
from
October 27, 2026 11:06
3098e99 to
9d25aad
Compare
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.
Stacked on #14. This is the trust-store half of Phase 3 item 3.5g, following the design in
phase-3.md§3.5b: NSS'scertdata.txt, vendored at a pinned commit, is converted bycargo xtask tablesinto a Rust table of DER roots, the same way the Public Suffix List is.What's in it
crates/clazel-x509/data/nss-0a2b0c75/holdscertdata.txtat nss-dev/nss0a2b0c75(2026-10-20, 1,356,175 bytes) and NSS'sCOPYING(MPL-2.0), with aSOURCE.mdgiving URLs, sizes, SHA-256 and the update procedure.xtask/src/roots.rs, wired intocargo xtask tables, and intocargo xtask checkas a staleness check like the PSL one. It joins each trust object to its certificate by issuer and serial. It stops on an unknown trust value, an unlinked object, a label mismatch, a duplicate, malformed DER, or a SHA-256 that disagrees with NSS's fingerprint comment. It has its own SHA-256, tested against FIPS vectors, so it adds no new dependency.crates/clazel-x509/src/roots/is plain data outsideverus!. Each entry holds the label, the DER, the SHA-256, andserver_distrust_after.Modelling choices (also in the crate README)
CKT_NSS_TRUSTED_DELEGATOR. That is 118 of 169.MUST_VERIFY) and 2 roots trusted for nothing (Go Daddy Class 2, Starfield Class 2). None are distrusted or code-signing-only in this file, but the generator handles both.CKA_NSS_SERVER_DISTRUST_AFTERis carried, not applied. Path validation (3.5b) must enforce it. Only Izenpe.com sets it among the included roots (260415235959Z).Tests (
tests/trust_store.rs, 8 tests)certdata.txtagrees with the table.sha256sum/shasum. That test, and the independent-scan test, are ignored under Miri.Local results
I re-ran these after restacking from
phase3/trust-storeonto this base:cargo xtask checkreported STATIC CHECKS PASSED, including the new table check.cargo fmt --all --checkand strict clippy (clazel-x509,xtask) are clean.cargo test -p clazel-x509gives 63 passed, 0 failed.execgives 14 verified, 0 errors.No full verify has run, and the crate stays at tier 0. Not done: handshake conformance against a table root (3.5g).
🤖 Generated with Claude Code