Changes between Version 1 and Version 2 of windows-signing
- Timestamp:
- Oct 9, 2025, 4:35:39 PM (9 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
windows-signing
v1 v2 3 3 This is how we do automated code signing of Windows binaries using a !YubiKey. We started with: 4 4 5 * Enterprise Contract with Sectigo, https://www.sectigo.com5 * Enterprise Contract with [https://www.sectigo.com Secitgo] 6 6 * !YubiKey 5 FIPS 7 * !YubiKey Smart Card Minidriver (Windows) from https://www.yubico.com/support/download/smart-card-drivers-tools/ 8 * yubio-piv-tool from https://developers.yubico.com/yubico-piv-tool/ 7 * [https://www.yubico.com/support/download/smart-card-drivers-tools/ YubiKey Smart Card Minidriver (Windows)] 8 * [https://developers.yubico.com/yubico-piv-tool/ yubio-piv-tool] 9 * !YubiKey Authenticator application from Windows Store 9 10 * signtool from Microsoft Visual Studio 10 * scsigntool from https://www.mgtek.com/smartcard11 * MGTEK's [https://www.mgtek.com/smartcard scsigntool] 11 12 12 Outline:13 Protocol: 13 14 14 * Use d !YubiKey Authenticator application from Windows Store to set PIN, PUK, and Management Key15 * Use !YubiKey Authenticator application to set PIN, PUK, and Management Key (could use yubio-piv-tool instead) 15 16 * Install !YubiKey Smart Card Minidriver 17 * [https://support.yubico.com/hc/en-us/articles/360015654560-Deploying-the-YubiKey-Smart-Card-Minidriver-to-workstations-and-servers installation notes] 16 18 * Install yubio-piv-tool 17 19 * Get email invitation to submit code signing CSR to Sectigo initiated by corporate IT … … 66 68 `yubico-piv-tool --action=import-certificate --slot=$SLOT --key --pin-policy=once --touch-policy=never --input=$CERT_BASE_cert.cer` 67 69 68 == Install intermediate certificates onto !YubiKey70 === Install intermediate certificates onto !YubiKey 69 71 70 72 Use "Root/Intermediate(s) only, PEM encoded" certificates. Downloads as `CERT_BASE_interm.cer`. … … 90 92 == Sign Code 91 93 92 Microsoft's `signtool` doesn't have a way to provide the PIN needed use the private key. So use MGTEK's `scsigntool` to wrap signtool. In our case: 94 Microsoft's `signtool` doesn't have a way to provide the PIN needed utilize the private key. So use MGTEK's `scsigntool` to wrap signtool. `ScSignTool.exe` and `ScSignTool.dll` are placed in the directory where `signtool` is used. 95 96 For example: 93 97 {{{ 94 98 scsigntool.exe -pin CODESIGN sign /v /a /sha1 CERT_SHA /fd sha256 /t http://timestamp.sectigo.com/authenticode /d "Application Name" app-installer.exe