From 8baf84f36b9375b6f333cd483965544ef3656bf8 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 5 Oct 2009 22:15:32 +0100 Subject: hostmanager: Only initialse SSL contexts if SSL library available --- core/hostmanager.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 2fcfc0f4..2c8174ee 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -51,9 +51,11 @@ function activate(host, host_config) end end - local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl"); - if ssl_config then - hosts[host].ssl_ctx = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx })); + if ssl then + local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl"); + if ssl_config then + hosts[host].ssl_ctx = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx })); + end end log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); -- cgit v1.2.3