Diff

core/certmanager.lua @ 4990:75fe91372f92

certmanager: Fix traceback for missing LuaSec (thanks Link Mauve)
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Jul 2012 14:17:42 +0100
parent 4925:55f6e0673e33
child 4991:bcbfcec620ac
line wrap: on
line diff
--- a/core/certmanager.lua	Mon Jul 23 14:03:00 2012 +0100
+++ b/core/certmanager.lua	Mon Jul 23 14:17:42 2012 +0100
@@ -17,8 +17,8 @@
 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"