Changeset

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
parents 4989:573123ff2ab0
children 4991:bcbfcec620ac
files core/certmanager.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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"