Skip to content

Use psign for self-signing release artifacts#3

Merged
Marc-André Moreau (mamoreau-devolutions) merged 12 commits into
masterfrom
awakecoding/psign-self-signing
May 20, 2026
Merged

Use psign for self-signing release artifacts#3
Marc-André Moreau (mamoreau-devolutions) merged 12 commits into
masterfrom
awakecoding/psign-self-signing

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Summary

  • Document NuGet dotnet tool installation for Devolutions.Psign.Tool.
  • Update release self-signing to use the built psign-tool and move Windows executable signing to a Linux runner using psign-tool --mode portable sign.
  • Add portable Azure Key Vault PE signing plus sign-time RFC3161 timestamping so Linux release signing preserves timestamped Authenticode signatures.
  • Fix Key Vault signing bridge/base64url handling and enable default package features needed for the published tool.
  • Add E2E coverage with psign-server for portable/windows Key Vault and timestamped portable PE signing.

Validation

  • cargo fmt --all
  • cargo test -p psign --test cli_pe_digest azure_key_vault --features azure-kv-sign,timestamp-server,timestamp-http -- --nocapture
  • cargo clippy --workspace --all-targets --locked
  • cargo test --workspace --locked
  • Dry-run release succeeded: https://github.com/Devolutions/psign/actions/runs/26189262747
  • Downloaded dry-run Windows x64/arm64 artifacts and verified both psign-tool.exe files are Authenticode Valid and include DigiCert RFC3161 timestamp attributes (1.3.6.1.4.1.311.3.3.1).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass the older SIGNER_DIGEST_SIGN_INFO_V1 layout to SignerSignEx3 for the basic Authenticode digest callback used by Azure Key Vault signing, while preserving the Windows crate layout for decoupled DLL signing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SignerSignEx3 may invoke the Authenticode digest callback outside the caller thread. Store the Azure Key Vault signing state behind a process-wide mutex so the callback can reach it reliably, and surface non-secret callback errors in CI logs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure Key Vault keys/sign uses base64url-encoded digest and signature values. Update the REST helper and local psign-server mock to match Azure, and enable the Windows Key Vault PE signing E2E test with timestamping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add sign-time RFC3161 timestamping to portable PE signing so Azure Key Vault self-signing can run from a Linux psign-tool while preserving timestamped Authenticode signatures.

Switch the release sign_windows job to ubuntu-latest and have it download the Linux x64 psign-tool artifact to sign Windows executables in portable mode with the existing Key Vault and timestamp settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) merged commit ed81a1d into master May 20, 2026
11 checks passed
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) deleted the awakecoding/psign-self-signing branch May 20, 2026 22:37
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.

1 participant