Skip to content

Fix PE RFC3161 timestamps in code mode#16

Closed
Bradley Grainger (bgrainger) wants to merge 1 commit into
Devolutions:masterfrom
bgrainger:fix-time-stamping
Closed

Fix PE RFC3161 timestamps in code mode#16
Bradley Grainger (bgrainger) wants to merge 1 commit into
Devolutions:masterfrom
bgrainger:fix-time-stamping

Conversation

@bgrainger
Copy link
Copy Markdown
Contributor

@bgrainger Bradley Grainger (bgrainger) commented May 25, 2026

Follow-up to #10 / #11.

As per #10 (comment) the outer NuGet package was signed and timestamped, but the DLLs inside were not time-stamped. This PR fixes that.


AI-generated Text Below

Summary

  • propagate code mode RFC3161 timestamp options into PE/WinMD signing
  • timestamp the newly signed PE signature row, including nested DLLs inside signed .nupkg containers
  • add regression coverage for top-level PE timestamping and nested PE timestamping in package signing

Repro

Using psign-tool code --mode portable to sign a real Logos.Test.1.0.0.nupkg package with Azure Artifact Signing and --timestamp-url http://timestamp.acs.microsoft.com/:

  • before this change, the package signature carried an RFC3161 timestamp but the embedded Logos.Test.dll signature did not
  • after this change, both the package signature and the embedded DLL carry the expected timestamp attributes

Testing

  • cargo test --test code_command
  • cargo test -- --skip code_signing_vector_manifest_committed_entries_are_current

Propagate code-mode RFC3161 timestamp options into PE/WinMD signing so top-level PE targets and nested PE payloads inside signed containers receive Microsoft Authenticode timestamp attributes. Add regression coverage for top-level PE timestamping and for nested DLLs inside a .nupkg.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions
Copy link
Copy Markdown
Contributor

Bradley Grainger (@bgrainger) I had another pull request ready with a bunch of fixes, but you caught something else, so I just incorporated it into #15

things go way too fast with AI these days ;)

Marc-André Moreau (mamoreau-devolutions) added a commit that referenced this pull request May 25, 2026
## Summary
- add portable Artifact Signing remote-sign embedding for CAB, MSI/MSP,
generic catalogs, and flat MSIX/AppX final signing
- add native-shaped portable batch ergonomics, expanded credential
resolution, and non-PE timestamp persistence
- incorporate [#16](#16) by
propagating code-mode RFC3161 timestamp options into PE/WinMD signing
- update docs and integration tests for the expanded replacement surface

## Validation
- cargo fmt --all
- cargo clippy --workspace --all-targets --locked
- cargo test --workspace --locked
- targeted Artifact Signing integration tests
- targeted code-mode RFC3161 timestamp regression tests from #16

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bradley Grainger <bradley.grainger@logos.com>
@mamoreau-devolutions
Copy link
Copy Markdown
Contributor

...and merged, so.closing this PR. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants