From 93f062ef641152f54cc25fa2f1e71111cdba6aaf Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 12 Jun 2012 17:02:35 +0500 Subject: certmanager: Add quotes around cert file path when logging. --- core/certmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/certmanager.lua') diff --git a/core/certmanager.lua b/core/certmanager.lua index d524a07e..38092654 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -78,7 +78,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 -- cgit v1.2.3 From 9d5b5e9a9133e4aab2017824f0317db2e8053152 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 23 Jul 2012 14:17:42 +0100 Subject: certmanager: Fix traceback for missing LuaSec (thanks Link Mauve) --- core/certmanager.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/certmanager.lua') diff --git a/core/certmanager.lua b/core/certmanager.lua index 38092654..e5006694 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -17,8 +17,8 @@ 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_major, luasec_minor = ssl and ssl._VERSION:match("^(%d+)%.(%d+)"); +local luasec_has_noticket = ssl and (tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4); module "certmanager" -- cgit v1.2.3 From d1da857c337479cf0d9d9f0c62936faefa08d957 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 23 Jul 2012 16:39:49 +0100 Subject: certmanager: Fix for traceback WITH LuaSec... (!) (thanks IRON) --- core/certmanager.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/certmanager.lua') diff --git a/core/certmanager.lua b/core/certmanager.lua index e5006694..8a22f3df 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -17,8 +17,11 @@ local prosody = prosody; local resolve_path = configmanager.resolve_relative_path; local config_path = prosody.paths.config; -local luasec_major, luasec_minor = ssl and ssl._VERSION:match("^(%d+)%.(%d+)"); -local luasec_has_noticket = ssl and (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" -- cgit v1.2.3 From badc4159d600642f97d064a7f74c2ff68dda8abf Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 23 Jul 2012 16:42:26 +0100 Subject: certmanager: Remove unused import of setmetatable --- core/certmanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/certmanager.lua') diff --git a/core/certmanager.lua b/core/certmanager.lua index 8a22f3df..20a6d609 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -11,7 +11,7 @@ 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; -- cgit v1.2.3