summaryrefslogtreecommitdiff
path: root/src/subcommands/ma/list-certifiers
blob: e920888eb60faa0c41f08251ab7cc1fe63b60f26 (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_authentication "--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_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key --fingerprint $key"
  21. done
  22. }