aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
committerKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
commit6ef7c4d80892f486d71e660b054bdfdb993c8528 (patch)
tree103fd7d9396b60b9f76071a009c54d3ca9d35744 /core/certmanager.lua
parenta9029bd099734436154fc4e794d3b958e54d1943 (diff)
parentd32f36b2817739d7f8d5f1208a3009b7be379562 (diff)
downloadprosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.tar.gz
prosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.zip
Merge 0.10->trunk
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;
+};