Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

gpg.sh 877B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. INPUT=$(</dev/stdin)
  3. VALID=false
  4. REVSIG=false
  5. IFS=$'\n'
  6. for LINE in $(echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null); do
  7. case "$LINE" in
  8. "[GNUPG:] VALIDSIG "*)
  9. while read KEY; do
  10. case "$LINE" in "[GNUPG:] VALIDSIG $KEY "*) VALID=true;; esac
  11. done < ./contrib/verify-commits/trusted-keys
  12. ;;
  13. "[GNUPG:] REVKEYSIG "*)
  14. [ "$BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG" != 1 ] && exit 1
  15. while read KEY; do
  16. case "$LINE" in "[GNUPG:] REVKEYSIG ${KEY:24:40} "*)
  17. REVSIG=true
  18. GOODREVSIG="[GNUPG:] GOODSIG ${KEY:24:40} "
  19. ;;
  20. esac
  21. done < ./contrib/verify-commits/trusted-keys
  22. ;;
  23. esac
  24. done
  25. if ! $VALID; then
  26. exit 1
  27. fi
  28. if $VALID && $REVSIG; then
  29. echo "$INPUT" | gpg --trust-model always "$@" | grep "\[GNUPG:\] \(NEWSIG\|SIG_ID\|VALIDSIG\)" 2>/dev/null
  30. echo "$GOODREVSIG"
  31. else
  32. echo "$INPUT" | gpg --trust-model always "$@" 2>/dev/null
  33. fi