Mercurial > prosody-hg
diff core/certmanager.lua @ 2997:6ccaefea80ec
Merge with tip.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Fri, 12 Mar 2010 18:41:05 +0100 |
| parents | 7339c2720b39 |
| children | 9bb2da325d4d 3976bad56640 |
line wrap: on
line diff
--- a/core/certmanager.lua Fri Mar 12 18:37:51 2010 +0100 +++ b/core/certmanager.lua Fri Mar 12 18:41:05 2010 +0100 @@ -3,7 +3,7 @@ local ssl = ssl; local ssl_newcontext = ssl and ssl.newcontext; -local setmetatable = setmetatable; +local setmetatable, tostring = setmetatable, tostring; local prosody = prosody; @@ -39,8 +39,10 @@ reason = "Check that the path is correct, and the file exists."; elseif reason == "system lib" then reason = "Previous error (see logs), or other system error."; + elseif reason == "(null)" or not reason then + reason = "Check that the file exists and the permissions are correct"; else - reason = "Reason: "..tostring(reason or "unknown"):lower(); + reason = "Reason: "..tostring(reason):lower(); end log("error", "SSL/TLS: Failed to load %s: %s", file, reason); else @@ -54,7 +56,7 @@ end function reload_ssl_config() - default_ssl_config = config.get("*", "core", "ssl"); + default_ssl_config = configmanager.get("*", "core", "ssl"); end prosody.events.add_handler("config-reloaded", reload_ssl_config);
