From 99ee0fc72df0483980b0d4f4bfff7eb38e353ed5 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 27 Nov 2019 11:54:33 +0000 Subject: [PATCH] Fix Windows signing args The hash arg seems to only accept the short `-h` form. In addition, the args in the environment contained a fixed hash type which is removed here. --- electron_app/riot.im/env.sh | 2 +- scripts/electron_winSign.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/electron_app/riot.im/env.sh b/electron_app/riot.im/env.sh index 79cb6e4e83..0ee810521d 100644 --- a/electron_app/riot.im/env.sh +++ b/electron_app/riot.im/env.sh @@ -1 +1 @@ -export OSSLSIGNCODE_SIGNARGS='-pkcs11module /Library/Frameworks/eToken.framework/Versions/Current/libeToken.dylib -pkcs11engine /usr/local/lib/engines/engine_pkcs11.so -certs electron_app/riot.im/New_Vector_Ltd.pem -key 0a3271cbc1ec0fd8afb37f6bbe0cd65ba08d3b4d -t http://timestamp.comodoca.com -h sha256 -verbose' +export OSSLSIGNCODE_SIGNARGS='-pkcs11module /Library/Frameworks/eToken.framework/Versions/Current/libeToken.dylib -pkcs11engine /usr/local/lib/engines/engine_pkcs11.so -certs electron_app/riot.im/New_Vector_Ltd.pem -key 0a3271cbc1ec0fd8afb37f6bbe0cd65ba08d3b4d -t http://timestamp.comodoca.com -verbose' diff --git a/scripts/electron_winSign.js b/scripts/electron_winSign.js index 9cd2d3f6a9..4e88afd07a 100644 --- a/scripts/electron_winSign.js +++ b/scripts/electron_winSign.js @@ -36,7 +36,7 @@ exports.default = async function(options) { 'tmp_' + Math.random().toString(36).substring(2, 15) + '.exe', ); const args = [ - '-hash', options.hash, + '-h', options.hash, '-pass', tokenPassphrase, '-in', inPath, '-out', tmpFile, @@ -44,6 +44,7 @@ exports.default = async function(options) { if (options.isNest) args.push('-nest'); cmdLine += shellescape(args); + console.log("Running", cmdLine); const signproc = exec(cmdLine, {}, (error, stdout) => { console.log(stdout); });