Software /
code /
prosody
Changeset
1925:6897bd311afa
hostmanager: Only initialse SSL contexts if SSL library available
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 22:15:32 +0100 |
parents | 1924:75e6ba240888 |
children | 1926:e1c5b537f240 |
files | core/hostmanager.lua |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);