# HG changeset patch # User Matthew Wild # Date 1254777332 -3600 # Node ID 6897bd311afa73ff0c67eee045b52e09a40a5d67 # Parent 75e6ba240888a9293f73dd6fa0e49302c7e956aa hostmanager: Only initialse SSL contexts if SSL library available diff -r 75e6ba240888 -r 6897bd311afa core/hostmanager.lua --- a/core/hostmanager.lua Mon Oct 05 18:47:01 2009 +0100 +++ b/core/hostmanager.lua Mon Oct 05 22:15:32 2009 +0100 @@ -51,9 +51,11 @@ 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);