summaryrefslogtreecommitdiff
path: root/src/subcommands/mh/publish-key
blob: 792d858796795d1103327262368ab561e3e1e53b (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. read -p "Really publish host key to $KEYSERVER? (y/N) " OK; OK=${OK:=N}
  13. if [ ${OK/y/Y} != 'Y' ] ; then
  14. failure "key not published."
  15. fi
  16. # find the key fingerprint
  17. fingerprint=$(fingerprint_server_key)
  18. # publish host key
  19. gpg_authentication "--keyserver $KEYSERVER --send-keys '0x${fingerprint}!'"