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