Skip to content

Add signed payload trailers (#66) - #67

Merged
sehkone merged 2 commits into
mainfrom
sehkone/issue-66
Aug 26, 2026
Merged

Add signed payload trailers (#66)#67
sehkone merged 2 commits into
mainfrom
sehkone/issue-66

Conversation

@sehkone

@sehkone sehkone commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds append_trailer_signed, allowing caller-owned signing to stamp a detached Ed25519 signature and matching key_id into packages and installer payloads.
  • Validates signer results before writing output, preserves unsigned writer output, and keeps present envelope offsets valid across trailer rewraps.
  • Adds signer error propagation, verification round trips, and release notes for the public API.

Closes #66

Test plan

  • Verify signed .pkg and installer payloads against a fixture trust set, including a signed rewrap.
  • Confirm the callback receives the exact manifest bytes written to the container.
  • Reject invalid signature and key_id values, and signer failures, before any output is written.
  • Confirm the unsigned entry point remains byte-for-byte unchanged and keeps both envelope pairs absent.
  • Run cargo fmt -- --check --config group_imports=StdExternalCrate.
  • Run both required cargo clippy configurations and both required cargo test configurations.

Let release tooling stamp an opaque detached signature and key identifier
without taking custody of signing material in deploy-core.

Closes #66
Keep the signing API release note within Markdown lint's line limit.

Part of #66
@sehkone

sehkone commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

[Reviewer Round 1]

No findings.

The PR implements Issue #66 as specified: it adds the callback-based signed writer, validates signature and key_id before output, preserves the unsigned API, and correctly carries signed envelope blocks through rewrap. The tests cover real verification for package and installer forms, callback-byte identity, validation/error propagation, and signed rewrap.

PR hygiene is also sound: PR #67 closes #66, includes a test plan, and has no review-thread issue creation or unrelated linkage.

@sehkone

sehkone commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

[Review Verdict Round 1: APPROVED]

@sehkone

sehkone commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Suggested squash commit

Title

Add signed payload trailer writer

Body

Allow release tooling to stamp verified containers while keeping signer
configuration and private key custody outside deploy-core.

Closes #66

@sehkone
sehkone merged commit 395c79c into main Aug 26, 2026
4 checks passed
@sehkone
sehkone deleted the sehkone/issue-66 branch August 26, 2026 09:23
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.

Stamp a signature and key_id into a container this crate writes

1 participant