mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 11:37:19 +02:00
adapt signature check
This commit is contained in:
@@ -85,7 +85,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/${binaryName}
|
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/${binaryName}
|
||||||
|
|
||||||
# check binary was not manipulated (checksum test)
|
# check binary was not manipulated (checksum test)
|
||||||
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/manifest-v${pinnedVersion}.txt.asc
|
sudo -u admin wget -N https://github.com/guggero/chantools/releases/download/v${pinnedVersion}/manifest-v${pinnedVersion}.txt.sig
|
||||||
sudo -u admin wget --no-check-certificate -N -O "${downloadDir}/pgp_keys.asc" ${PGPpkeys}
|
sudo -u admin wget --no-check-certificate -N -O "${downloadDir}/pgp_keys.asc" ${PGPpkeys}
|
||||||
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
|
binaryChecksum=$(sha256sum ${binaryName} | cut -d " " -f1)
|
||||||
if [ "${binaryChecksum}" != "${SHA256}" ]; then
|
if [ "${binaryChecksum}" != "${SHA256}" ]; then
|
||||||
@@ -105,8 +105,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
fi
|
fi
|
||||||
gpg --import ./pgp_keys.asc
|
gpg --import ./pgp_keys.asc
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "# running: gpg --verify manifest-v${pinnedVersion}.txt.asc"
|
echo "# running: gpg --verify manifest-v${pinnedVersion}.txt.sig"
|
||||||
verifyResult=$(gpg --verify manifest-v${pinnedVersion}.txt.asc 2>&1)
|
verifyResult=$(gpg --verify manifest-v${pinnedVersion}.txt.sig 2>&1)
|
||||||
echo "# verifyResult(${verifyResult})"
|
echo "# verifyResult(${verifyResult})"
|
||||||
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
|
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
|
||||||
echo "# goodSignature(${goodSignature})"
|
echo "# goodSignature(${goodSignature})"
|
||||||
|
Reference in New Issue
Block a user