Sign Windows binaries with Azure Trusted Signing.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-08-23 15:00:39 -07:00
parent 981a262836
commit b268fe9478
2 changed files with 26 additions and 1 deletions

20
scripts/win-sign.js Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
const childProcess = require("node:child_process");
const {promisify} = require("node:util");
const exec = promisify(childProcess.exec);
exports.default = async ({path, hash}) => {
await exec(
`powershell.exe Invoke-TrustedSigning \
-Endpoint https://eus.codesigning.azure.net/ \
-CodeSigningAccountName kandralabs \
-CertificateProfileName kandralabs \
-Files '${path}' \
-FileDigest '${hash}' \
-TimestampRfc3161 http://timestamp.acs.microsoft.com \
-TimestampDigest '${hash}'`,
{stdio: "inherit"},
);
};