Skip to content

Commit 5a0daa6

Browse files
committedOct 18, 2016
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 f3c63e7 commit 5a0daa6

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
 

‎tools/sign.bat

+15
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 not ERRORLEVEL 1 (
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if "%target%" == "Clean" goto exit
204204
@rem Skip signing if the `nosign` option was specified.
205205
if defined nosign goto licensertf
206206

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

210210
:licensertf
@@ -272,7 +272,7 @@ msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%
272272
if errorlevel 1 goto exit
273273

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

278278
:upload

0 commit comments

Comments
 (0)
Please sign in to comment.