local function create_context(host, mode, ...)
local cfg = new_config();
cfg:apply(core_defaults);
- cfg:apply(global_ssl_config);
local service_name, port = host:match("^(%w+) port (%d+)$");
if service_name then
cfg:apply(find_service_cert(service_name, tonumber(port)));
-- We can't read the password interactively when daemonized
password = function() log("error", "Encrypted certificate for %s requires 'ssl' 'password' to be set in config", host); end;
});
+ cfg:apply(global_ssl_config);
for i = select('#', ...), 1, -1 do
cfg:apply(select(i, ...));