aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-28 18:24:12 +0100
committerKim Alvefur <zash@zash.se>2016-02-28 18:24:12 +0100
commit67a2aba4210c390269f868a5573a3bcd4f1ccac2 (patch)
treedcd3c2f191f97e05d0b6d57127277f6611488d5a
parent42dd175443ce6d7063c04665d8abc4efe4f342aa (diff)
downloadprosody-67a2aba4210c390269f868a5573a3bcd4f1ccac2.tar.gz
prosody-67a2aba4210c390269f868a5573a3bcd4f1ccac2.zip
prosodyctl: check certs: Warn about certificate expiry in the near future
-rwxr-xr-xprosodyctl7
1 files changed, 7 insertions, 0 deletions
diff --git a/prosodyctl b/prosodyctl
index 4ae1136c..de397ccf 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -1243,6 +1243,13 @@ function commands.check(arg)
if not cert:validat(os.time()) then
print(" Certificate has expired.")
cert_ok = false
+ elseif not cert:validat(os.time() + 86400) then
+ print(" Certificate expires within one day.")
+ cert_ok = false
+ elseif not cert:validat(os.time() + 86400*7) then
+ print(" Certificate expires within one week.")
+ elseif not cert:validat(os.time() + 86400*13) then
+ print(" Certificate expires within one month.")
end
if config.get(host, "component_module") == nil
and not x509_verify_identity(host, "_xmpp-client", cert) then