Merge 0.10->trunk
[prosody.git] / prosodyctl
index 2972aa5365a9fc3f0d0bd0ddf044851166c8c469..ef62a9d8f155099a575e57556bab7766350950f5 100755 (executable)
@@ -365,8 +365,8 @@ function commands.deluser(arg)
        end
        local user, host = jid_split(arg[1]);
        if not user and host then
-               show_message [[Failed to understand JID, please supply the JID you want to set the password for]]
-               show_usage [[passwd user@host]]
+               show_message [[Failed to understand JID, please supply the JID to the user account you want to delete]]
+               show_usage [[deluser user@host]]
                return 1;
        end
        
@@ -1220,10 +1220,10 @@ function commands.check(arg)
                                        print("  Error: "..err);
                                        cert_ok = false
                                elseif not ssl_config.certificate then
-                                       print("  No 'certificate' set in ssl option for "..host)
+                                       print("  No 'certificate' found for "..host)
                                        cert_ok = false
                                elseif not ssl_config.key then
-                                       print("  No 'key' set in ssl option for "..host)
+                                       print("  No 'key' found for "..host)
                                        cert_ok = false
                                else
                                        local key, err = io.open(ssl_config.key); -- Permissions check only
@@ -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*31) 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