Skip to content

win,tools: use Azure Trusted Signing #58502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions tools/sign.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
@echo off

@REM From December 2023, new certificates use DigiCert cloud HSM service for EV signing.
@REM They provide a client side app smctl.exe for managing certificates and signing process.
@REM From June 2025, we started using Azure Trusted Signing for code signing.
@REM Release CI machines are configured to have it in the PATH so this can be used safely.
smctl sign -k key_nodejs -i %1

where signtool >nul 2>&1
if errorlevel 1 (
echo signtool not found in PATH.
exit /b 1
)

if "%AZURE_SIGN_DLIB_PATH%"=="" (
echo AZURE_SIGN_DLIB_PATH is not set.
exit /b 1
)

if "%AZURE_SIGN_METADATA_PATH%"=="" (
echo AZURE_SIGN_METADATA_PATH is not set.
exit /b 1
)


signtool sign /tr "http://timestamp.acs.microsoft.com" /td sha256 /fd sha256 /v /dlib %AZURE_SIGN_DLIB_PATH% /dmdf %AZURE_SIGN_METADATA_PATH% %1
if not ERRORLEVEL 1 (
echo Successfully signed %1 using smctl
echo Successfully signed %1 using signtool
exit /b 0
)
echo Could not sign %1 using smctl
echo Could not sign %1 using signtool
exit /b 1
Loading