summaryrefslogtreecommitdiff
path: root/src/share/mh/set_expire
blob: 2389e573515505f9d6bdb66e3708680836bcbc56 (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. gpg_host_edit expire <<EOF
  20. $extendTo
  21. save
  22. EOF
  23. cat <<EOF | log info
  24. NOTE: Host key expiration date adjusted, but not yet published.
  25. Run '$PGRM publish-key' to publish the new expiration date.
  26. EOF
  27. }