#4247 Fix Fatpack / git-verify with expired keys (#4378)

* modify git verify
* force outputs to English
---------
Co-authored-by: openoms <oms@tuta.io>
This commit is contained in:
/rootzoll 2024-01-19 18:27:35 +01:00 committed by GitHub
parent 970b4dfb5d
commit 91cddd9fb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,6 +30,10 @@ PGPsigner="$1"
PGPpubkeyLink="$2"
PGPpubkeyFingerprint="$3"
# force outputs to English
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
wget -O /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc "${PGPpubkeyLink}"
# in the case the wget above fails, try to use curl instead
@ -68,15 +72,13 @@ elif [ $# -eq 4 ]; then
commitOrTag="$4 tag"
fi
echo "# running: ${gitCommand}"
if ${gitCommand} 2>&1 >&"$_temp"; then
goodSignature=1
else
goodSignature=0
fi
${gitCommand} 2>&1 >&"$_temp"
echo
cat "$_temp"
echo "# goodSignature(${goodSignature})"
echo
goodSignature=$(grep "Good signature from" -c <"$_temp")
echo "# goodSignature(${goodSignature})"
correctKey=$(tr -d " \t\n\r" <"$_temp" | grep "${PGPpubkeyFingerprint}" -c)
echo "# correctKey(${correctKey})"