mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-30 05:28:50 +00:00
Merge pull request #1278 from tempelmann/master-origin
Make "sign_update" work on pre-10.13 system
This commit is contained in:
1 file changed
+8
-1
+8
-1
@@ -6,4 +6,11 @@ if [ "$#" -ne 2 ]; then
|
||||
exit 1
|
||||
fi
|
||||
openssl=/usr/bin/openssl
|
||||
$openssl dgst -sha1 -binary < "$1" | $openssl dgst -sha1 -sign "$2" | $openssl enc -base64
|
||||
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
|
||||
Reference in new issue
Block a user