diff options
author | Kim Alvefur <zash@zash.se> | 2016-02-28 18:24:12 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-02-28 18:24:12 +0100 |
commit | 4ae28434fa7f40619b6f4426f89f8e14ee900ca5 (patch) | |
tree | dcd3c2f191f97e05d0b6d57127277f6611488d5a /prosodyctl | |
parent | 0c30b8a27388823a4ac4d95ae32e118b99db81a3 (diff) | |
download | prosody-4ae28434fa7f40619b6f4426f89f8e14ee900ca5.tar.gz prosody-4ae28434fa7f40619b6f4426f89f8e14ee900ca5.zip |
prosodyctl: check certs: Warn about certificate expiry in the near future
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |