Skip to content

Commit 208586a

Browse files
committed
win,build: try multiple timeservers when signing
PR-URL: #9155 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: João Reis <reis@janeasystems.com>
1 parent a9f4fc9 commit 208586a

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tools/sign.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
3+
set timeservers=(http://timestamp.globalsign.com/scripts/timestamp.dll http://timestamp.comodoca.com/authenticode http://timestamp.verisign.com/scripts/timestamp.dll http://tsa.starfieldtech.com)
4+
5+
for %%s in %timeservers% do (
6+
signtool sign /a /d "Node.js" /du "https://nodejs.org" /t %%s %1
7+
if ERRORLEVEL 0 (
8+
echo Successfully signed %1 using timeserver %%s
9+
exit /b 0
10+
)
11+
echo Signing %1 failed using %%s
12+
)
13+
14+
echo Could not sign %1 using any available timeserver
15+
exit /b 1

vcbuild.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ if "%target%" == "Clean" goto exit
191191
@rem Skip signing if the `nosign` option was specified.
192192
if defined nosign goto licensertf
193193

194-
signtool sign /a /d "Node.js" /du "https://nodejs.org" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\node.exe
194+
call tools\sign.bat Release\node.exe
195195
if errorlevel 1 echo Failed to sign exe&goto exit
196196

197197
:licensertf
@@ -269,7 +269,7 @@ msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%
269269
if errorlevel 1 goto exit
270270

271271
if defined nosign goto upload
272-
signtool sign /a /d "Node.js" /du "https://nodejs.org" /t http://timestamp.globalsign.com/scripts/timestamp.dll node-v%FULLVERSION%-%target_arch%.msi
272+
call tools\sign.bat node-v%FULLVERSION%-%target_arch%.msi
273273
if errorlevel 1 echo Failed to sign msi&goto exit
274274

275275
:upload

0 commit comments

Comments
 (0)