Windows Signing
Sign Windows executables using Azure Trusted Signing via signtool.exe.
Usage
cargo codesign windows
This will:
- Load
sign.tomland read the[windows]section - Discover binaries via
cargo metadata - Generate
metadata.jsonfor Azure Trusted Signing - Sign each
.exewithsigntool.exeusing SHA-256 + timestamp - Clean up temporary metadata files
Install tools automatically
On a fresh CI runner, use --install-tools to download the Azure Code Signing DLib via NuGet:
cargo codesign windows --install-tools
Configuration
[windows]
timestamp-server = "http://timestamp.acs.microsoft.com"
[windows.env]
tenant-id = "AZURE_TENANT_ID"
client-id = "AZURE_CLIENT_ID"
client-secret = "AZURE_CLIENT_SECRET"
endpoint = "AZURE_SIGNING_ENDPOINT"
account-name = "AZURE_SIGNING_ACCOUNT_NAME"
cert-profile = "AZURE_SIGNING_CERT_PROFILE"
See the sign.toml Reference for full details, and Setting Up Credentials for how to obtain Azure Trusted Signing credentials.