use --show-keys for gpg fingerprint listing (#2950)

This commit is contained in:
Christoph Stenglein
2022-02-12 11:10:38 +01:00
committed by GitHub
parent fb6f1a243c
commit 84687fc254
7 changed files with 65 additions and 65 deletions

View File

@@ -33,7 +33,7 @@ PGPpubkeyFingerprint="$3"
wget -O /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc "${PGPpubkeyLink}"
gpg --import --import-options show-only /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc
fingerprint=$(gpg /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc 2>/dev/null | grep "${PGPpubkeyFingerprint}" -c)
fingerprint=$(gpg --show-keys /var/cache/raspiblitz/pgp_keys_${PGPsigner}.asc 2>/dev/null | grep "${PGPpubkeyFingerprint}" -c)
if [ "${fingerprint}" -lt 1 ]; then
echo
echo "# !!! WARNING --> the PGP fingerprint is not as expected for ${PGPsigner}" >&2

View File

@@ -85,8 +85,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
fi
# check gpg finger print
gpg ./pgp_keys.asc
fingerprint=$(sudo gpg "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
gpg --show-keys ./pgp_keys.asc
fingerprint=$(sudo gpg --show-keys "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo
echo "# !!! BUILD WARNING --> Channel Tools PGP author not as expected"

View File

@@ -133,8 +133,8 @@ if [ "${mode}" = "on" ] || [ "${mode}" = "1" ]; then
echo
echo "# getting gpg finger print"
gpg ./pgp_keys.asc
fingerprint=$(sudo gpg "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
gpg --show-keys ./pgp_keys.asc
fingerprint=$(sudo gpg --show-keys "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo "error='PGP author check failed'"
exit 1

View File

@@ -191,8 +191,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
fi
echo "# check gpg finger print"
gpg --keyid-format LONG ./pgp_keys.asc
fingerprint=$(gpg --keyid-format LONG "./pgp_keys.asc" 2>/dev/null \
gpg --show-keys --keyid-format LONG ./pgp_keys.asc
fingerprint=$(gpg --show-keys --keyid-format LONG "./pgp_keys.asc" 2>/dev/null \
| grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo ""

View File

@@ -122,8 +122,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
fi
echo "# check gpg finger print"
gpg --keyid-format LONG ./pgp_keys.asc
fingerprint=$(gpg --keyid-format LONG "./pgp_keys.asc" 2>/dev/null \
gpg --show-keys --keyid-format LONG ./pgp_keys.asc
fingerprint=$(gpg --show-keys --keyid-format LONG "./pgp_keys.asc" 2>/dev/null \
| grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo ""

View File

@@ -102,7 +102,7 @@ if [ "$1" = "install" ] ; then
sudo -u admin wget -N https://github.com/lightningnetwork/lnd/releases/download/v${lndVersion}/manifest-${PGPauthor}-v${lndVersion}.sig
sudo -u admin wget --no-check-certificate -N -O "pgp_keys.asc" ${PGPpkeys}
gpg --import --import-options show-only ./pgp_keys.asc
fingerprint=$(sudo gpg "pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
fingerprint=$(sudo gpg --show-keys "pgp_keys.asc" 2>/dev/null | grep "${PGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo ""
echo "!!! BUILD WARNING --> LND PGP author not as expected"

View File

@@ -177,8 +177,8 @@ if [ "${mode}" = "verified" ]; then
echo
echo "# getting gpg finger print"
gpg ./pgp_keys.asc
fingerprint=$(sudo gpg "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${lndUpdatePGPcheck}" -c)
gpg --show-keys ./pgp_keys.asc
fingerprint=$(sudo gpg --show-keys "${downloadDir}/pgp_keys.asc" 2>/dev/null | grep "${lndUpdatePGPcheck}" -c)
if [ ${fingerprint} -lt 1 ]; then
echo "error='PGP author check failed'"
exit 1