Comparison

core/certmanager.lua @ 3367:598c33a99a31

certmanager: Use an empty table as the default ssl config when a global 'ssl' config option isn't specified (fixes a top-level traceback on startup).
author Waqas Hussain <waqas20@gmail.com>
date Thu, 15 Jul 2010 11:25:41 +0500
parent 3356:cf6be653c619
child 3368:1748a49da906
child 3371:5b32e6f84392
comparison
equal deleted inserted replaced
3366:a2a242321901 3367:598c33a99a31
9 local resolve_path = prosody.resolve_relative_path; 9 local resolve_path = prosody.resolve_relative_path;
10 10
11 module "certmanager" 11 module "certmanager"
12 12
13 -- Global SSL options if not overridden per-host 13 -- Global SSL options if not overridden per-host
14 local default_ssl_config = configmanager.get("*", "core", "ssl"); 14 local default_ssl_config = configmanager.get("*", "core", "ssl") or {};
15 15
16 function create_context(host, mode, config) 16 function create_context(host, mode, config)
17 if not ssl then return nil; end 17 if not ssl then return nil; end
18 18
19 local user_ssl_config = config and config.core.ssl or default_ssl_config; 19 local user_ssl_config = config and config.core.ssl or default_ssl_config;