summaryrefslogtreecommitdiff
path: root/src/subcommands/mh/publish-key
blob: 8b36a18a39f21964dac7c87a58dfecd8f679756a (plain)
  1. #!/usr/bin/env bash
  2. # Monkeysphere host publish-key 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. # publish server key to keyserver
  12. publish_key() {
  13. read -p "Really publish host key to $KEYSERVER? (y/N) " OK; OK=${OK:=N}
  14. if [ ${OK/y/Y} != 'Y' ] ; then
  15. failure "key not published."
  16. fi
  17. # find the key fingerprint
  18. fingerprint=$(fingerprint_server_key)
  19. # publish host key
  20. gpg_authentication "--keyserver $KEYSERVER --send-keys '0x${fingerprint}!'"
  21. }