Comparison

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
comparison
equal deleted inserted replaced
4989:573123ff2ab0 4990:75fe91372f92
15 15
16 local prosody = prosody; 16 local prosody = prosody;
17 local resolve_path = configmanager.resolve_relative_path; 17 local resolve_path = configmanager.resolve_relative_path;
18 local config_path = prosody.paths.config; 18 local config_path = prosody.paths.config;
19 19
20 local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); 20 local luasec_major, luasec_minor = ssl and ssl._VERSION:match("^(%d+)%.(%d+)");
21 local luasec_has_noticket = tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4; 21 local luasec_has_noticket = ssl and (tonumber(luasec_major)>0 or tonumber(luasec_minor)>=4);
22 22
23 module "certmanager" 23 module "certmanager"
24 24
25 -- Global SSL options if not overridden per-host 25 -- Global SSL options if not overridden per-host
26 local default_ssl_config = configmanager.get("*", "core", "ssl"); 26 local default_ssl_config = configmanager.get("*", "core", "ssl");