aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index c2db63fe..fa920b91 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -3,7 +3,7 @@ local log = require "util.logger".init("certmanager");
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 @@ function create_context(host, mode, config)
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