summaryrefslogtreecommitdiff
path: root/src/share/ma/list_certifiers
blob: e37485ead6bbba2e0ac2455c98c14361ea1f674b (plain)
  1. # -*-shell-script-*-
  2. # This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
  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-2009, and are all released under the GPL,
  11. # version 3 or later.
  12. # list the host certifiers
  13. list_certifiers() {
  14. local keys
  15. local key
  16. # find trusted keys in authentication keychain
  17. keys=$(gpg_sphere "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-keys --with-colons --fingerprint" | \
  18. grep ^pub: | cut -d: -f2,5 | egrep '^(u|f):' | cut -d: -f2)
  19. # output keys
  20. for key in $keys ; do
  21. gpg_sphere "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key --fingerprint $key"
  22. done
  23. }