From a87c1036cab08e03fd94b670150e1b1267a1ac90 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 14 Sep 2019 22:39:52 -0400 Subject: [PATCH] Add a script to generate the Sparkle signatures. --- dev/sign.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 dev/sign.sh diff --git a/dev/sign.sh b/dev/sign.sh new file mode 100644 index 0000000..fd7c259 --- /dev/null +++ b/dev/sign.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +if [[ 2 -ne $# ]]; then + echo "Usage: $0 /path/to/archive.zip /path/to/keyring" + exit 1 +fi + +THIS_DIR=$(dirname "$0") + +ARCHIVE="$1" +KEYRING="$2" + +DSA_SIG=$(openssl dgst -sha1 -binary "$ARCHIVE" | openssl dgst -sha1 -sign "$KEYRING/dsa_priv.pem" | openssl enc -base64) +EDSA_SIG=$("$THIS_DIR/signer-ed25519" -sign -key "$KEYRING/ed25519_priv.pem" -file "$ARCHIVE" | openssl enc -a -A) + +echo "DSA = $DSA_SIG" +echo "ED25519 = $EDSA_SIG" -- 2.43.5