more big cleanup of host/authentication commands to reflect new
[monkeysphere.git] / src / subcommands / ma / list-certifiers
1 #!/usr/bin/env bash
2
3 # Monkeysphere authentication list-certifiers subcommand
4 #
5 # The monkeysphere scripts are written by:
6 # Jameson Rollins <jrollins@fifthhorseman.net>
7 # Jamie McClelland <jm@mayfirst.org>
8 # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
9 #
10 # They are Copyright 2008, and are all released under the GPL, version 3
11 # or later.
12
13 # list the host certifiers
14
15 list_certifiers() {
16
17 local keys
18 local key
19
20 # find trusted keys in authentication keychain
21 keys=$(gpg_sphere "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-keys --with-colons --fingerprint" | \
22     grep ^pub: | cut -d: -f2,5 | egrep '^(u|f):' | cut -d: -f2)
23
24 # output keys
25 for key in $keys ; do
26     gpg_sphere "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key --fingerprint $key"
27 done
28
29 }