Skip to content

Commit 6311de3

Browse files
authoredMar 25, 2023
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 38b6ecc commit 6311de3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tools/sign.bat

+1-1
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)
Please sign in to comment.