aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-05-16 01:07:58 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2015-05-16 01:07:58 +0200
commita3db1c7d0d69b1506effb2c4eec4d091392e21de (patch)
tree7b5080964d1701a2f78fa5c8315ea03e8ba59879
parentcde05af0f6f8406177d3075ef29470c46c8c7bfa (diff)
downloadbin-a3db1c7d0d69b1506effb2c4eec4d091392e21de.tar.xz
Add list-made-sigs
Short script to list all keys in your keyring that you have signed
-rwxr-xr-xlist-made-sigs14
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