From 9dac4cf7f40398e1063673d3bf79f40d34dcb9d5 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 29 Jan 2024 23:17:22 +0500 Subject: [PATCH] desktop: set signing has to sha256 --- apps/desktop/package.json | 1 + apps/desktop/sign.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 3b362e2a0..2b661467a 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -135,6 +135,7 @@ ] } ], + "signingHashAlgorithms": "sha256", "sign": "./sign.js", "icon": "assets/icons/app.ico" }, diff --git a/apps/desktop/sign.js b/apps/desktop/sign.js index abb85bc92..813079f38 100644 --- a/apps/desktop/sign.js +++ b/apps/desktop/sign.js @@ -24,9 +24,9 @@ module.exports = async function (configuration) { const Endpoint = "https://weu.codesigning.azure.net"; const CodeSigningAccountName = "Notesnook"; const CertificateProfileName = "Notesnook"; - const FileDigest = "SHA256"; + const FileDigest = configuration.hash.toUpperCase(); const TimestampRfc3161 = "http://timestamp.acs.microsoft.com"; - const TimestampDigest = "SHA256"; + const TimestampDigest = configuration.hash.toUpperCase(); const Description = "The Notesnook app"; const DescriptionUrl = "https://notesnook.com/"; const FilesCatalog = createCatalog(configuration.path); @@ -35,8 +35,6 @@ module.exports = async function (configuration) { console.debug("Signing", configuration.path, "using command", command); - console.debug("Catalog", readFileSync(FilesCatalog, "utf-8")); - psexec(command); console.debug("Signed", configuration.path);