diff options
author | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-24 23:57:09 -0700 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@phys.columbia.edu> | 2008-08-24 23:57:09 -0700 |
commit | 050302344aba552900a199d76fab57fd49c05795 (patch) | |
tree | 2d9165f527c1eca667cd74ca16f74d270d239d6f /src/monkeysphere-server | |
parent | 140fd9b87865c53ead7b16c28a8bc040c2650026 (diff) |
tweaked the key expiration checking function, and replied to SJJ's bug
comment.
Diffstat (limited to 'src/monkeysphere-server')
-rwxr-xr-x | src/monkeysphere-server | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/monkeysphere-server b/src/monkeysphere-server index 3c4eed4..4c8ecdc 100755 --- a/src/monkeysphere-server +++ b/src/monkeysphere-server @@ -308,12 +308,7 @@ gen_key() { fi # prompt about key expiration if not specified - if [ -z "$keyExpire" ] ; then - keyExpire=$(get_gpg_expiration) - fi - if ! test_gpg_expire "$keyExpire" ; then - failure "invalid key expiration value '$keyExpire'." - fi + keyExpire=$(get_gpg_expiration "$keyExpire") # set key parameters keyParameters=$(cat <<EOF @@ -382,12 +377,8 @@ extend_key() { failure "You don't appear to have a MonkeySphere host key on this server. Try 'monkeysphere-server gen-key' first." fi - if [ -z "$extendTo" ]; then - extendTo=$(get_gpg_expiration) - fi - if ! test_gpg_expire "$extendTo" ; then - failure "invalid expiration value '$extendTo'." - fi + # get the new expiration date + extendTo=$(get_gpg_expiration "$extendTo") gpg_host --quiet --command-fd 0 --edit-key "$fpr" <<EOF expire |