diff options
author | Matt Goins <mjgoins@openflows.com> | 2009-01-31 18:26:39 -0500 |
---|---|---|
committer | Matt Goins <mjgoins@openflows.com> | 2009-01-31 18:26:39 -0500 |
commit | 53f4ee78f320371a0f07865b21fdb4d6707a79d6 (patch) | |
tree | 0959fc1b238901d3362ee53b321aee93dacdbca6 /src/subcommands/mh/extend-key | |
parent | 3495cebaaf254225cd8f27ce2a70752aada838d4 (diff) | |
parent | 0d36aebed69b154903e158a4c0f5cc8707cf5168 (diff) |
Merge commit 'jrollins/master'
Diffstat (limited to 'src/subcommands/mh/extend-key')
-rwxr-xr-x | src/subcommands/mh/extend-key | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/subcommands/mh/extend-key b/src/subcommands/mh/extend-key new file mode 100755 index 0000000..8f1ecc2 --- /dev/null +++ b/src/subcommands/mh/extend-key @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# Monkeysphere host extend-key subcommand +# +# The monkeysphere scripts are written by: +# Jameson Rollins <jrollins@fifthhorseman.net> +# Jamie McClelland <jm@mayfirst.org> +# Daniel Kahn Gillmor <dkg@fifthhorseman.net> +# +# They are Copyright 2008, and are all released under the GPL, version 3 +# or later. + +# extend the lifetime of a host key: + +extend_key() { + +local fpr=$(fingerprint_server_key) +local extendTo="$1" + +# get the new expiration date +extendTo=$(get_gpg_expiration "$extendTo") + +gpg_host --quiet --command-fd 0 --edit-key "$fpr" <<EOF +expire +$extendTo +save +EOF + +echo +echo "NOTE: Host key expiration date adjusted, but not yet published." +echo "Run '$PGRM publish-key' to publish the new expiration date." + +} |