Code Signing with SignTool and AzureSignTool
signtool.exe is Microsoft's official signing tool, included in the Windows SDK. AzureSignTool is a free, open-source extension that adds Azure Key Vault support. Together they cover the most common Windows code signing workflows.
Both tools sign all standard Windows file types: .exe, .dll, .msi, .msix, .cab, .ps1, .appx and .sys. Choose signtool.exe for USB tokens and local certificate store, or AzureSignTool for cloud-based signing with Azure Key Vault.
What is signtool.exe?
Microsoft's official command-line tool for Authenticode signing. Included in the Windows SDK (Windows 10/11 SDK). Signs all standard Windows file types: .exe, .dll, .msi, .msix, .cab, .ps1, .appx, .sys. Works directly with USB tokens (SafeNet eToken) via the Windows certificate store.
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /a "MyApp.exe"
What is AzureSignTool?
AzureSignTool ↗ is an open-source .NET tool that extends the signtool concept to Azure Key Vault. Authenticates via service principal, managed identity or Azure CLI. Fully replaces signtool.exe for Azure Key Vault-based signing. Install via:
dotnet tool install --global AzureSignTool
Example with Azure Key Vault:
AzureSignTool sign \ -kvu https://your-vault.vault.azure.net \ -kvc YourCertName \ -kvt your-tenant-id \ -kvi your-client-id \ -kvs your-client-secret \ -fd sha256 \ -tr http://timestamp.digicert.com \ -td sha256 \ "MyApp.exe"
SignTool vs AzureSignTool
| signtool.exe | AzureSignTool | |
|---|---|---|
| Installation | Included in Windows SDK | .NET tool (dotnet tool install) |
| Key storage | USB tokens + local certificate store | Azure Key Vault HSM keys |
| Platform | Windows only | Cross-platform (.NET) |
| Azure support | No | Yes, Azure Key Vault |
| CI/CD pipelines | Requires physical token or local cert | Supports pipelines directly |
| Price | Free (part of Windows SDK) | Free and open source |
Common signtool commands
Sign with USB token (auto-select certificate)
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /a "MyApp.exe"
Sign with specific certificate (SHA1 thumbprint)
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /sha1 ABCDEF1234567890 "MyApp.exe"
Verify signature
signtool verify /pa /v "MyApp.exe"
Sign multiple files
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 /a *.exe
Timestamp servers
Always use /tr (RFC 3161), not /t (older Authenticode format). RFC 3161 is more robust and recommended by all CAs.
DigiCert: http://timestamp.digicert.com GlobalSign: http://timestamp.globalsign.com/tsa/r6advanced1
Timestamping ensures signatures remain valid after the certificate expires. Without a timestamp, the signature becomes invalid when the certificate expires.
CI/CD pipeline examples
AzureSignTool integrates into Azure DevOps, GitHub Actions and GitLab CI. Here are examples for the most common pipelines:
Azure DevOps
- task: DotNetCoreCLI@2
displayName: 'Install AzureSignTool'
inputs:
command: 'custom'
custom: 'tool'
arguments: 'install --global AzureSignTool'
- script: |
AzureSignTool sign \
-kvu $(KeyVaultUrl) \
-kvc $(CertificateName) \
-kvt $(TenantId) \
-kvi $(ClientId) \
-kvs $(ClientSecret) \
-fd sha256 \
-tr http://timestamp.digicert.com \
-td sha256 \
"$(Build.ArtifactStagingDirectory)\**\*.exe"
displayName: 'Sign executables' GitHub Actions
- name: Install AzureSignTool
run: dotnet tool install --global AzureSignTool
- name: Sign executables
run: |
AzureSignTool sign \
-kvu ${{ secrets.KEY_VAULT_URL }} \
-kvc ${{ secrets.CERT_NAME }} \
-kvt ${{ secrets.TENANT_ID }} \
-kvi ${{ secrets.CLIENT_ID }} \
-kvs ${{ secrets.CLIENT_SECRET }} \
-fd sha256 \
-tr http://timestamp.digicert.com \
-td sha256 \
"MyApp.exe" Store Key Vault credentials as pipeline variables or secrets. Use Azure RBAC with a managed identity for keyless authentication.
Related signing tools: SignTool / AzureSignTool | Jsign | Compare all →
Code Signing certificates for SignTool and AzureSignTool
OV Code Signing
DigiCert CodeSign OV
DigiCert OV Code Signing. Works with signtool.exe and AzureSignTool.
GlobalSign CodeSign
GlobalSign OV Code Signing. Works with signtool.exe and AzureSignTool.
EV Code Signing
Frequently asked questions about SignTool and AzureSignTool
Find answers to the most common questions about SSL certificates and FairSSL.
C:\Program Files (x86)\Windows Kits\10\bin\10.x.x.x\x64\signtool.exeReady to sign with SignTool?
Create a free account and issue your first certificate in under 10 minutes.