aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
committerKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
commit27265c20e21d071bc96171da9b8707aec6ea669b (patch)
tree71be0c3f872550dc6849e4cde3afd5ebfa68c1b9 /core/certmanager.lua
parent359ca86e382251845aa294baac60d9f8f58e1fe1 (diff)
downloadprosody-27265c20e21d071bc96171da9b8707aec6ea669b.tar.gz
prosody-27265c20e21d071bc96171da9b8707aec6ea669b.zip
core.*: Remove use of module() function
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index b40c13c1..958ad3a3 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -45,7 +45,7 @@ local luasec_has = {
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 @@ if luasec_version < 5 and ssl_x509 then
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 @@ function create_context(host, mode, ...)
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 @@ end
prosody.events.add_handler("config-reloaded", reload_ssl_config);
-return _M;
+return {
+ create_context = create_context;
+ reload_ssl_config = reload_ssl_config;
+};