aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/certmanager.lua2
-rw-r--r--core/hostmanager.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index e5fabdce..64644be9 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -18,7 +18,7 @@ local default_ssl_ctx_in_mt = { __index = default_ssl_ctx_in };
-- Global SSL options if not overridden per-host
local default_ssl_config = configmanager.get("*", "core", "ssl");
-function get_context(host, mode, config)
+function create_context(host, mode, config)
local ssl_config = config and config.core.ssl or default_ssl_config;
if ssl and ssl_config then
return ssl_newcontext(setmetatable(ssl_config, mode == "client" and default_ssl_ctx_mt or default_ssl_ctx_in_mt));
diff --git a/core/hostmanager.lua b/core/hostmanager.lua
index f8d7400d..7071296f 100644
--- a/core/hostmanager.lua
+++ b/core/hostmanager.lua
@@ -65,8 +65,8 @@ function activate(host, host_config)
end
end
- hosts[host].ssl_ctx = certmanager.get_context(host, "client", host_config); -- for outgoing connections
- hosts[host].ssl_ctx_in = certmanager.get_context(host, "server", host_config); -- for incoming connections
+ hosts[host].ssl_ctx = certmanager.create_context(host, "client", host_config); -- for outgoing connections
+ hosts[host].ssl_ctx_in = certmanager.create_context(host, "server", host_config); -- for incoming connections
log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host);
eventmanager.fire_event("host-activated", host, host_config);