diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-05-16 01:07:58 +0200 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2015-05-16 01:07:58 +0200 |
commit | a3db1c7d0d69b1506effb2c4eec4d091392e21de (patch) | |
tree | 7b5080964d1701a2f78fa5c8315ea03e8ba59879 | |
parent | cde05af0f6f8406177d3075ef29470c46c8c7bfa (diff) | |
download | bin-a3db1c7d0d69b1506effb2c4eec4d091392e21de.tar.xz |
Add list-made-sigs
Short script to list all keys in your keyring that you have signed
-rwxr-xr-x | list-made-sigs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/list-made-sigs b/list-made-sigs new file mode 100755 index 0000000..c70247f --- /dev/null +++ b/list-made-sigs @@ -0,0 +1,14 @@ +#!/usr/bin/bash +keys=() + +fingerprints=$(gpg --list-public-keys | grep 'Key fingerprint' | sed 's/\s\{6\}Key fingerprint = //') +while read -r fp; do + keys+=("$fp") +done <<<"$fingerprints" + +for key in "${keys[@]}"; do + gpg --list-sigs "$key" | grep 'sig' | sed 's/^sig .\s\{8\}//' | cut -d' ' -f1 | grep "$1" 2>&1 >/dev/null + if [[ $? == 0 ]]; then + printf "%s %s\n" "You signed:" "$key" + fi +done |