Adapt osslcodesign script

Reference the new drivers
This commit is contained in:
Christian Hohnstaedt 2024-10-03 17:12:00 +02:00
parent dc81c25670
commit caa0fa2ca4
2 changed files with 19 additions and 8 deletions

View File

@ -13,7 +13,7 @@
Keywords="Installer" Description="XCA Installer"
Languages="1033" SummaryCodepage="1252"
Comments="X Certificate and key management"
Manufacturer="Open Source Developer, Christian Hohnstaedt" />
Manufacturer="Christian Hohnstädt" />
<MajorUpgrade Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>

View File

@ -3,17 +3,28 @@
if test -z "$1"; then echo "usage: $0 <filename>"; exit 1; fi
set -x
V="${1##xca-}"
V="${1##*xca-}"
V="${V%%-*}"
export PKCS11SPY=/opt/SimpleSign/libcrypto3PKCS.so
case "$OSTYPE" in
darwin*)
engine=/opt/homebrew/lib/engines-3/pkcs11.dylib
module=/usr/local/lib/libSimplySignPKCS.dylib
;;
linux*)
engine=/usr/lib/x86_64-linux-gnu/engines-3/libpkcs11.so
module=/opt/SimplySignDesktop/SimplySignPKCS_64-MS-1.0.20.so
;;
*)
echo "Unknown operating system $OSTYPE"
esac
pkcs11_id="9d8aad00d9fa2bc1f104e9744108d4551b53d2b7"
/usr/bin/osslsigncode sign -askpass -certs ~/osdch.crt -askpass \
-key "pkcs11:object=Open%20Source%20Developer%2C%20Christian%20Hohnstaedt" \
-pkcs11engine /usr/lib/x86_64-linux-gnu/engines-1.1/libpkcs11.so \
-pkcs11module /usr/lib/x86_64-linux-gnu/pkcs11-spy.so \
osslsigncode sign \
-key "$pkcs11_id" -pkcs11cert "$pkcs11_id" \
-pkcs11engine "$engine" -pkcs11module "$module" \
-n "XCA ${V}" -i https://hohnstaedt.de/xca \
-t http://timestamp.comodoca.com -h sha2 \
-in "${1}" -out "${1}.signed" 2>/dev/null &&
-in "${1}" -out "${1}.signed" &&
exec mv "${1}.signed" "${1}"