Software /
code /
prosody
Diff
core/certmanager.lua @ 6779:6236668da30a
core.*: Remove use of module() function
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:42:19 +0100 |
parent | 6570:70e65ac65219 |
child | 6903:5ff42d85d4d5 |
line wrap: on
line diff
--- a/core/certmanager.lua Sat Feb 21 10:38:44 2015 +0100 +++ b/core/certmanager.lua Sat Feb 21 10:42:19 2015 +0100 @@ -45,7 +45,7 @@ single_ecdh_use = luasec_version >= 2; }; -module "certmanager" +local _ENV = nil; -- Global SSL options if not overridden per-host local global_ssl_config = configmanager.get("*", "ssl"); @@ -78,7 +78,7 @@ end end -function create_context(host, mode, ...) +local function create_context(host, mode, ...) local cfg = new_config(); cfg:apply(core_defaults); cfg:apply(global_ssl_config); @@ -154,7 +154,7 @@ return ctx, err, user_ssl_config; end -function reload_ssl_config() +local function reload_ssl_config() global_ssl_config = configmanager.get("*", "ssl"); if luasec_has.no_compression then core_defaults.options.no_compression = configmanager.get("*", "ssl_compression") ~= true; @@ -163,4 +163,7 @@ prosody.events.add_handler("config-reloaded", reload_ssl_config); -return _M; +return { + create_context = create_context; + reload_ssl_config = reload_ssl_config; +};