Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Vagg <rod@vagg.org>2016-10-18 13:26:39 +0300
committerRod Vagg <rod@vagg.org>2016-10-18 16:32:15 +0300
commit92b232ba01111bfe592e6457bbf8375ca67b11cd (patch)
treec414dcabe3bfd9393b510bd3ca125ae0d7af9e78
parenta14a6a3a1170d75a727b20273d04f642e269bea6 (diff)
win,build: try multiple timeservers when signing
PR-URL: https://github.com/nodejs/node/pull/9155 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: João Reis <reis@janeasystems.com>
-rw-r--r--tools/sign.bat15
-rw-r--r--vcbuild.bat4
2 files changed, 17 insertions, 2 deletions
diff --git a/tools/sign.bat b/tools/sign.bat
new file mode 100644
index 00000000000..aa003bca681
--- /dev/null
+++ b/tools/sign.bat
@@ -0,0 +1,15 @@
+@echo off
+
+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)
+
+for %%s in %timeservers% do (
+ signtool sign /a /d "node" /t %%s %1
+ if not ERRORLEVEL 1 (
+ echo Successfully signed %1 using timeserver %%s
+ exit /b 0
+ )
+ echo Signing %1 failed using %%s
+)
+
+echo Could not sign %1 using any available timeserver
+exit /b 1
diff --git a/vcbuild.bat b/vcbuild.bat
index adf54eb6595..b9f386740fd 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -196,7 +196,7 @@ if errorlevel 1 goto exit
@rem Skip signing if the `nosign` option was specified.
if defined nosign goto licensertf
-signtool sign /a /d "node" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\node.exe
+call tools\sign.bat Release\node.exe
if errorlevel 1 echo Failed to sign exe&goto exit
:licensertf
@@ -216,7 +216,7 @@ msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%
if errorlevel 1 goto exit
if defined nosign goto upload
-signtool sign /a /d "node" /t http://timestamp.globalsign.com/scripts/timestamp.dll node-v%FULLVERSION%-%target_arch%.msi
+call tools\sign.bat node-v%FULLVERSION%-%target_arch%.msi
if errorlevel 1 echo Failed to sign msi&goto exit
:upload