mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
15 lines
418 B
Bash
Executable File
15 lines
418 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ue
|
|
|
|
DISTDIR=$1
|
|
|
|
export FINGERPRINT=$(gpg --verify ${DISTDIR}/*checksums.txt.sig ${DISTDIR}/*checksums.txt 2>&1 | grep 'using RSA key' | awk '{ print $NF }')
|
|
|
|
if [[ "${FINGERPRINT}" == "${SIGNING_FINGERPRINT}" ]]; then
|
|
echo 'verified signature'
|
|
else
|
|
echo "signed with unknown fingerprint: ${FINGERPRINT}"
|
|
echo " expected fingerprint: ${SIGNING_FINGERPRINT}"
|
|
exit 1
|
|
fi
|