]> src.bluestatic.org Git - macgdbp.git/blob - dev/sign.sh
Centralize font selection via +[BSSourceView sourceFont].
[macgdbp.git] / dev / sign.sh
1 #!/bin/sh
2
3 set -e
4
5 if [[ 2 -ne $# ]]; then
6 echo "Usage: $0 /path/to/archive.zip /path/to/keyring"
7 exit 1
8 fi
9
10 THIS_DIR=$(dirname "$0")
11
12 ARCHIVE="$1"
13 KEYRING="$2"
14
15 DSA_SIG=$(openssl dgst -sha1 -binary "$ARCHIVE" | openssl dgst -sha1 -sign "$KEYRING/dsa_priv.pem" | openssl enc -base64)
16 EDSA_SIG=$("$THIS_DIR/signer-ed25519" -sign -key "$KEYRING/ed25519_priv.pem" -file "$ARCHIVE" | openssl enc -a -A)
17
18 echo "DSA = $DSA_SIG"
19 echo "ED25519 = $EDSA_SIG"