WINDOWS_SIGNING.md
This guide explains how to set up Windows code signing for Stirling-PDF desktop application builds.
Windows code signing is essential for:
Popular certificate authorities for Windows code signing:
You'll receive a certificate in one of these formats:
.pfx or .p12 (preferred - contains both certificate and private key).cer + private key (needs conversion to .pfx)If you have separate certificate and private key files:
openssl pkcs12 -export -out certificate.pfx -inkey private-key.key -in certificate.cer
Navigate to your GitHub repository → Settings → Secrets and variables → Actions
Add the following secrets:
WINDOWS_CERTIFICATEOn macOS/Linux:
base64 -i certificate.pfx | pbcopy # Copies to clipboard
On Windows (PowerShell):
[Convert]::ToBase64String([IO.File]::ReadAllBytes("certificate.pfx")) | Set-Clipboard
Paste the entire base64 string into the GitHub secret.
WINDOWS_CERTIFICATE_PASSWORDIf you're using Tauri's built-in updater feature:
TAURI_SIGNING_PRIVATE_KEYnpm run tauri signer generateTAURI_SIGNING_PRIVATE_KEY_PASSWORDThe Windows signing configuration is already set up:
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": "http://timestamp.digicert.com"
}
Configuration Options:
certificateThumbprint: Automatically extracted from imported certificate (leave as null)digestAlgorithm: Hashing algorithm - sha256 is recommendedtimestampUrl: Timestamp server to prove signing time (survives certificate expiration)Alternative Timestamp Servers:
http://timestamp.digicert.comhttp://timestamp.sectigo.comhttp://timestamp.globalsign.comThe workflow includes three Windows signing steps:
Before pushing to GitHub, test locally:
# Set environment variables
$env:WINDOWS_CERTIFICATE = [Convert]::ToBase64String([IO.File]::ReadAllBytes("certificate.pfx"))
$env:WINDOWS_CERTIFICATE_PASSWORD = "your-certificate-password"
# Build the application
cd frontend
npm run tauri build
# Verify the signature
Get-AuthenticodeSignature "./src-tauri/target/release/bundle/msi/Stirling-PDF_*.msi"
After downloading the built artifacts:
Windows (PowerShell):
Get-AuthenticodeSignature "Stirling-PDF-windows-x86_64.exe"
Get-AuthenticodeSignature "Stirling-PDF-windows-x86_64.msi"
Look for:
ValidWindows (GUI):
WINDOWS_CERTIFICATE secret is setNever commit certificates to version control
Rotate certificates before expiration
Use strong passwords
Monitor certificate usage
Limit access to secrets
WINDOWS_CERTIFICATE secret with new base64-encoded certificateWINDOWS_CERTIFICATE_PASSWORD if password changedIf you encounter issues with Windows code signing: