summaryrefslogtreecommitdiff
path: root/src/monkeysphere-server
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-07-31 21:44:18 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-07-31 21:44:18 -0400
commit60931f1c182c6b163862c2eb34b48e459c51c23a (patch)
treef31532f383236cf2815df945467f0b5831dc68aa /src/monkeysphere-server
parent0b5404f0488d5ea642aec2e92988740af23d820d (diff)
be a little more helpful by printing out the actual expiration dates when things are expiring.
Diffstat (limited to 'src/monkeysphere-server')
-rwxr-xr-xsrc/monkeysphere-server7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index 03a4ccb..16836b2 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -387,6 +387,9 @@ diagnostics() {
local curdate
local warnwindow
local warndate
+ local create
+ local expire
+ local uid
seckey=$(gpg_host --list-secret-keys --with-colons --fixed-list-mode)
keysfound=$(echo "$seckey" | grep -c ^sec:)
@@ -408,7 +411,7 @@ diagnostics() {
echo "Host key is expired!"
# FIXME: recommend a way to resolve this other than re-keying?
elif (( "$keyexp" < "$warndate" )); then
- echo "Host key expires in less than $warnwindow"
+ echo "Host key expires in less than $warnwindow:" $(date -d "$(( $keyexp - $curdate )) seconds" +%F)
# FIXME: recommend a way to resolve this?
fi
# and weirdnesses:
@@ -431,7 +434,7 @@ diagnostics() {
echo "User ID '$uid' is expired!"
# FIXME: recommend a way to resolve this
elif (( "$expire" < "$warndate" )); then
- echo "User ID '$uid' expires in less than $warnwindow"
+ echo "User ID '$uid' expires in less than $warnwindow:" $(date -d "$(( $expire - $curdate )) seconds" +%F)
# FIXME: recommend a way to resolve this
fi
fi