Skip to content

Commit 556d832

Browse files
omer-rothclaude
andcommitted
CM-70024: sync the new signing cert by keypair alias
certsync without an alias only synced the first keypair the account returns (the old cert), so signtool still had no match for the new thumbprint. Restore --keypair-alias, sourced from SM_KEYPAIR_ALIAS_NEW. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent bfb7c08 commit 556d832

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/build_executable.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,18 @@ jobs:
238238
SM_HOST: ${{ secrets.SM_HOST }}
239239
SM_API_KEY: ${{ secrets.SM_API_KEY }}
240240
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
241-
# TODO(CM-70024): revert to SM_CODE_SIGNING_CERT_SHA1_HASH once the new cert is confirmed working
241+
# TODO(CM-70024): revert to the non-_NEW secrets once the new cert is confirmed working
242+
SM_KEYPAIR_ALIAS: ${{ secrets.SM_KEYPAIR_ALIAS_NEW }}
242243
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH_NEW }}
243244
run: |
244245
:: setup SSM KSP
245246
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/smtools-windows-x64.msi/download -H "x-api-key:%SM_API_KEY%" -o smtools-windows-x64.msi
246247
msiexec /i smtools-windows-x64.msi /quiet /qn
247248
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
248249
249-
:: sync every cert in the account into the Windows store; signtool /sha1 below
250-
:: selects the right one, so there is no keypair alias to keep in sync on renewal
251-
smctl windows certsync
250+
:: certsync without an alias only syncs the first keypair the account returns,
251+
:: so the alias is required to get the current signing cert into the store
252+
smctl windows certsync --keypair-alias=%SM_KEYPAIR_ALIAS%
252253
253254
:: sign executable (in onedir mode the exe lives inside the collected directory)
254255
set "EXE_PATH=.\dist\cycode-cli.exe"

0 commit comments

Comments
 (0)