aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-05 22:15:32 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-05 22:15:32 +0100
commit8baf84f36b9375b6f333cd483965544ef3656bf8 (patch)
tree7f3bdd304c1e5348152cc920762b44196cbe5334 /core
parent0a4866517055a976b9c1cc177a4be99e1214c357 (diff)
downloadprosody-8baf84f36b9375b6f333cd483965544ef3656bf8.tar.gz
prosody-8baf84f36b9375b6f333cd483965544ef3656bf8.zip
hostmanager: Only initialse SSL contexts if SSL library available
Diffstat (limited to 'core')
-rw-r--r--core/hostmanager.lua8
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);