aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-07-28 01:14:31 +0100
committerMatthew Wild <mwild1@gmail.com>2012-07-28 01:14:31 +0100
commitfbe75768718891167313bc0cbcffcd3a46042d31 (patch)
tree2732225257e7b8ade28695dad7c0df3f7cea00b1 /core/certmanager.lua
parent8395775fc1bd1e72a8c83927003d2af1ed5f304a (diff)
parentf926338983c2f1dd0276d41e3c3d8e28cbef3d02 (diff)
downloadprosody-fbe75768718891167313bc0cbcffcd3a46042d31.tar.gz
prosody-fbe75768718891167313bc0cbcffcd3a46042d31.zip
Merge with Florob
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index d524a07e..20a6d609 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -11,14 +11,17 @@ local log = require "util.logger".init("certmanager");
local ssl = ssl;
local ssl_newcontext = ssl and ssl.newcontext;
-local setmetatable, tostring = setmetatable, tostring;
+local tostring = tostring;
local prosody = prosody;
local resolve_path = configmanager.resolve_relative_path;
local config_path = prosody.paths.config;
-local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)");
-local luasec_has_noticket = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4;
+local luasec_has_noticket;
+if ssl then
+ local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)");
+ luasec_has_noticket = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4;
+end
module "certmanager"
@@ -78,7 +81,7 @@ function create_context(host, mode, user_ssl_config)
else
reason = "Reason: "..tostring(reason):lower();
end
- log("error", "SSL/TLS: Failed to load %s: %s (for %s)", file, reason, host);
+ log("error", "SSL/TLS: Failed to load '%s': %s (for %s)", file, reason, host);
else
log("error", "SSL/TLS: Error initialising for %s: %s", host, err);
end