Skip to content

vaportpm: split session out of derive; build in lockboot:build; drop rcgen/ring#10

Merged
HarryR merged 4 commits into
mainfrom
refactor-derive-session-split
Jul 11, 2026
Merged

vaportpm: split session out of derive; build in lockboot:build; drop rcgen/ring#10
HarryR merged 4 commits into
mainfrom
refactor-derive-session-split

Conversation

@HarryR

@HarryR HarryR commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Three related changes, stacked on #9 (this is one unit of work).

1. attest: split session/policy out of derive. Extract the generic TPM
auth-session + policy commands (start_auth_session, policy_pcr,
policy_get_digest) from derive.rs into a new session.rs as a pub(crate) SessionOps trait, and dedupe the single-bank PCR-selection helper into pcr.rs.
derive.rs keeps only the PCR-gated key-derivation feature. Public API unchanged.

2. build: run cargo inside lockboot:build. Adopt the stage0/stage1 shape --
a vendored build.mk (canonical copy in stage0, synced via the workspace
make sync-harness) wraps every cargo target in DOCKER_RUN -> lockboot:build,
so vaportpm builds cc-free-by-design and reproducibly. Host links with the image
cc (rust-lld cannot link glibc executables); musl release artifacts use rust-lld

  • crt-static. Adds Dockerfile.build, rust-toolchain.toml (1.91.1) and
    .cargo/config.toml; CI now runs make ci in-image on the pinned toolchain; drops
    the standalone rust:latest devcontainer in favour of the workspace one.

3. verify: drop rcgen/ring from tests. Replace the rcgen dev-dependency (which
pulled ring + a C toolchain) with x509-cert's builder + p256/p384 signers for
the test certificate factory. Removes ring, cc, rcgen, yasna, untrusted,
time from the resolved graph; nothing new pulled but the builder/hazmat features
(opted in by verify only, so attest's no_std/UEFI build is unaffected) and a
rand_core dev-dep.

make ci is green in lockboot:build (fmt-check + check + clippy -D warnings + test

  • doc; gcp 16 + nitro 13 integration tests + lib tests pass).

Note: the shared build harness also lands in stage0/stage1 (their build.mk +
Makefile include) and the workspace (sync-harness/check-harness) via their own
branches -- this PR carries only vaportpm's slice.

🤖 Generated with Claude Code

HarryR and others added 3 commits July 11, 2026 17:50
Extract the generic TPM auth-session and policy commands (start_auth_session, policy_pcr, policy_get_digest) from derive.rs into a new session.rs as a pub(crate) SessionOps trait, and dedupe the single-bank PCR selection helper into pcr.rs. derive.rs keeps only the PCR-gated key-derivation feature (DeriveOps plus the keyedhash/HMAC machinery). Public API is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adopt the stage0/stage1 build shape so vaportpm builds cc-free-by-design and reproducibly. A vendored build.mk (canonical copy lives in stage0, synced via the workspace make sync-harness) wraps every cargo target in DOCKER_RUN -> lockboot:build. Add Dockerfile.build, rust-toolchain.toml (1.91.1), and .cargo/config.toml (host links with the image cc since rust-lld cannot link glibc executables; musl release artifacts use rust-lld + crt-static). CI now runs make ci in-image on the pinned toolchain; drop the standalone rust:latest devcontainer in favour of the workspace one.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the rcgen dev-dependency (which pulled ring and a C toolchain) with x509-cert's builder plus p256/p384 signers for the test certificate factory in test_support.rs, x509.rs, ephemeral_nitro_tests.rs and tests/gcp.rs. Enables the x509-cert builder + hazmat features and adds a rand_core dev-dependency for ephemeral keys; removes ring, cc, rcgen, yasna, untrusted and time from the resolved graph with nothing new pulled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HarryR HarryR marked this pull request as ready for review July 11, 2026 18:09
First git-tagged release baseline. 0.1.0 and 0.2.0 were never tagged, and 0.2.0 existed in two distinct untagged states (post-#9 on main, and this PR), so a clean 0.3.0 anchors the accumulated feature (no_std attestation surface) and internal (session split, lockboot:build harness, x509-cert test certs) changes to a single verifiable point. High-assurance consumers should pin as { git = "...", rev = "<sha>", version = "=0.3.0" }.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@HarryR HarryR merged commit 7041f46 into main Jul 11, 2026
1 check passed
@HarryR HarryR deleted the refactor-derive-session-split branch July 11, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant