Skip to content

Commit 3ce6a64

Browse files
tniessenRafaelGSS
authored andcommitted
tools: upgrade Windows digital signature to SHA256
signtool still defaults to SHA1, which is vulnerable to certain collisions. This switches to SHA256, which is stronger and which also matches the hash function used by the signing certificate. Technically, `/fd certHash` would be a better choice, but I don't know if it is widely supported. PR-URL: #47206 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 30f3e41 commit 3ce6a64

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/sign.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
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)
44

55
for %%s in %timeservers% do (
6-
signtool sign /a /d "Node.js" /du "https://nodejs.org" /t %%s %1
6+
signtool sign /a /d "Node.js" /du "https://nodejs.org" /fd SHA256 /t %%s %1
77
if not ERRORLEVEL 1 (
88
echo Successfully signed %1 using timeserver %%s
99
exit /b 0

0 commit comments

Comments
 (0)