summaryrefslogtreecommitdiffstats
path: root/OSX/sparkle-bin/old_dsa_scripts/sign_update
diff options
context:
space:
mode:
authorSimon Rettberg2019-02-18 11:55:41 +0100
committerSimon Rettberg2019-02-18 11:55:41 +0100
commitae69a754244c4e475c8d2591772ca8e005071d83 (patch)
tree58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /OSX/sparkle-bin/old_dsa_scripts/sign_update
parentUpdate gitignore (diff)
downloadxscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz
xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip
Update to 5.42
Diffstat (limited to 'OSX/sparkle-bin/old_dsa_scripts/sign_update')
-rwxr-xr-xOSX/sparkle-bin/old_dsa_scripts/sign_update18
1 files changed, 18 insertions, 0 deletions
diff --git a/OSX/sparkle-bin/old_dsa_scripts/sign_update b/OSX/sparkle-bin/old_dsa_scripts/sign_update
new file mode 100755
index 0000000..fddaae8
--- /dev/null
+++ b/OSX/sparkle-bin/old_dsa_scripts/sign_update
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -e
+set -o pipefail
+if [ "$#" -ne 2 ]; then
+ echo "Usage: $0 update_archive_file dsa_priv.pem"
+ echo "This is an old DSA signing script for deprecated DSA keys."
+ echo "Do not use this for new applications."
+ exit 1
+fi
+openssl=/usr/bin/openssl
+version=`$openssl version`
+if [[ $version =~ "OpenSSL 0.9" ]]; then
+ # pre-10.13 system: Fall back to OpenSSL DSS1 digest because it does not like the -sha1 option
+ $openssl dgst -sha1 -binary < "$1" | $openssl dgst -dss1 -sign "$2" | $openssl enc -base64
+else
+ # 10.13 and later: Use LibreSSL SHA1 digest
+ $openssl dgst -sha1 -binary < "$1" | $openssl dgst -sha1 -sign "$2" | $openssl enc -base64
+fi