mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 15:31:31 +00:00
- our new key now supports both - note that we don't bother to "dual sign" for both sha1 and sha2, as Win7 upwards sha2 is supported (and we already don't support XP, Vista, etc anymore)
35 lines
797 B
Bash
Executable file
35 lines
797 B
Bash
Executable file
#!/bin/bash
|
|
|
|
here=$(dirname "$0")
|
|
test -n "$here" -a -d "$here" || exit
|
|
cd $here
|
|
|
|
CERT_FILE=${CERT_FILE:-~/codesigning/cert.pem}
|
|
KEY_FILE=${KEY_FILE:-~/codesigning/key.pem}
|
|
if [[ ! -f "$CERT_FILE" ]]; then
|
|
ls $CERT_FILE
|
|
echo "Make sure that $CERT_FILE and $KEY_FILE exist"
|
|
fi
|
|
|
|
if ! which osslsigncode > /dev/null 2>&1; then
|
|
echo "Please install osslsigncode"
|
|
fi
|
|
|
|
rm -rf signed
|
|
mkdir -p signed >/dev/null 2>&1
|
|
|
|
cd dist
|
|
echo "Found $(ls *.exe | wc -w) files to sign."
|
|
for f in $(ls *.exe); do
|
|
echo "Signing $f..."
|
|
osslsigncode sign \
|
|
-h sha256 \
|
|
-certs "$CERT_FILE" \
|
|
-key "$KEY_FILE" \
|
|
-n "Electrum" \
|
|
-i "https://electrum.org/" \
|
|
-t "http://timestamp.digicert.com/" \
|
|
-in "$f" \
|
|
-out "../signed/$f"
|
|
ls ../signed/$f -lah
|
|
done
|