Browse Source
0.136e800c2
Add Pieter's new PGP key to verify-commits/trusted-keys (Matt Corallo)1d94b72
Whitelist commits signed with Pieter's now-revoked key (Matt Corallo)27252b7
Fix pre-push-hook regexes (Matt Corallo)
Pieter Wuille
9 years ago
5 changed files with 36 additions and 3 deletions
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
586a29253dabec3ca0f1ccba9091daabd16b8411 |
||||
eddaba7b5692288087a926da5733e86b47274e4e |
@ -1,15 +1,33 @@
@@ -1,15 +1,33 @@
|
||||
#!/bin/sh |
||||
INPUT=$(</dev/stdin) |
||||
VALID=false |
||||
REVSIG=false |
||||
IFS=$'\n' |
||||
for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do |
||||
case "$LINE" in "[GNUPG:] VALIDSIG"*) |
||||
case "$LINE" in |
||||
"[GNUPG:] VALIDSIG "*) |
||||
while read KEY; do |
||||
case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac |
||||
done < ./contrib/verify-commits/trusted-keys |
||||
;; |
||||
"[GNUPG:] REVKEYSIG "*) |
||||
[ "$BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG" != 1 ] && exit 1 |
||||
while read KEY; do |
||||
case "$LINE" in "[GNUPG:] REVKEYSIG ${KEY:24:40} "*) |
||||
REVSIG=true |
||||
GOODREVSIG="[GNUPG:] GOODSIG ${KEY:24:40} " |
||||
;; |
||||
esac |
||||
done < ./contrib/verify-commits/trusted-keys |
||||
;; |
||||
esac |
||||
done |
||||
if ! $VALID; then |
||||
exit 1 |
||||
fi |
||||
if $VALID && $REVSIG; then |
||||
echo "$INPUT" | gpg --trust-model always "$@" | grep "\[GNUPG:\] \(NEWSIG\|SIG_ID\|VALIDSIG\)" 2>/dev/null |
||||
echo "$GOODREVSIG" |
||||
else |
||||
echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null |
||||
fi |
||||
|
Loading…
Reference in new issue