summaryrefslogtreecommitdiff
path: root/src/share/mh/set_expire
blob: b03e0d02833f84ac3bc06625bc58266f97187979 (plain)
  1. # -*-shell-script-*-
  2. # This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
  3. # Monkeysphere host set-expire subcommand
  4. #
  5. # This is a function to set the expiration date of the monkeysphere
  6. # host key.
  7. #
  8. # The monkeysphere scripts are written by:
  9. # Jameson Rollins <jrollins@finestructure.net>
  10. # Jamie McClelland <jm@mayfirst.org>
  11. # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  12. #
  13. # They are Copyright 2008-2009, and are all released under the GPL,
  14. # version 3 or later.
  15. set_expire() {
  16. local extendTo
  17. # get the new expiration date
  18. extendTo=$(get_gpg_expiration "$1")
  19. log info "setting host key expiration to ${extendTo}:"
  20. log debug "executing host expire script..."
  21. gpg_host_edit expire <<EOF
  22. $extendTo
  23. save
  24. EOF
  25. cat <<EOF | log info
  26. NOTE: Host key expiration date adjusted, but not yet published.
  27. Run '$PGRM publish-key' to publish the new expiration date.
  28. EOF
  29. }