merging jrollins and micah work, reverting ui changes for m-h gen-key and import-key
[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 local keys
16 local key
17
18 # find trusted keys in authentication keychain
19 keys=$(gpg_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-keys --with-colons --fingerprint" | \
20     grep ^pub: | cut -d: -f2,5 | egrep '^(u|f):' | cut -d: -f2)
21
22 # output keys
23 for key in $keys ; do
24     gpg_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key --fingerprint $key"
25 done