From 386cb061d0884d2afbe78ca8a49e41c10e4f5f00 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') 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