diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-10-05 22:15:32 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-10-05 22:15:32 +0100 |
commit | 8baf84f36b9375b6f333cd483965544ef3656bf8 (patch) | |
tree | 7f3bdd304c1e5348152cc920762b44196cbe5334 | |
parent | 0a4866517055a976b9c1cc177a4be99e1214c357 (diff) | |
download | prosody-8baf84f36b9375b6f333cd483965544ef3656bf8.tar.gz prosody-8baf84f36b9375b6f333cd483965544ef3656bf8.zip |
hostmanager: Only initialse SSL contexts if SSL library available
-rw-r--r-- | core/hostmanager.lua | 8 |
1 files changed, 5 insertions, 3 deletions
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); |