File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ OUTPUT_DIR="${OUTPUT_DIR:-downloads}"
1414TORRENT_DIR=" ${TORRENT_DIR:- watch} "
1515HASHES_URL=" ${HASHES_URL:- https:// www.getmonero.org/ downloads/ hashes.txt} "
1616BF_KEY_URL=" ${BF_KEY_URL:- https:// raw.githubusercontent.com/ monero-project/ monero/ master/ utils/ gpg_keys/ binaryfate.asc} "
17+ BF_EXPECTED_FP=" 81AC591FE9C4B65C5806AFC3F0AF4D462A0BDF92" # binaryFate's fingerprint
1718
1819# afaict the only important thing for hash determinism is piece size
1920PIECE_SIZE=21
@@ -51,6 +52,19 @@ for tuple in "$HASHES_URL:hashes.txt" "$BF_KEY_URL:binaryfate.asc"; do
5152 fi
5253done
5354
55+ # get fingerprint from the binaryfate.asc file
56+ # fingerprint (fpr) is on 10th column https://github.com/gpg/gnupg/blob/master/doc/DETAILS
57+ actual_fp=$( gpg --with-colons --show-keys " $OUTPUT_DIR /binaryfate.asc" 2> /dev/null | awk -F: ' /^fpr:/ {print $10; exit}' )
58+
59+ if [ " $actual_fp " != " $BF_EXPECTED_FP " ]; then
60+ echo " ERROR: Key fingerprint mismatch!"
61+ echo " Got: $actual_fp "
62+ echo " Expected: $BF_EXPECTED_FP "
63+ exit 1
64+ fi
65+
66+ echo " GPG key fingerprint verified: $BF_EXPECTED_FP "
67+
5468gpg --import " $OUTPUT_DIR /binaryfate.asc"
5569gpg --verify " $OUTPUT_DIR /hashes.txt"
5670
You can’t perform that action at this time.
0 commit comments