mod_bosh: pcall() core_process_stanza per stanza, to bring in line with other listene...
[prosody.git] / plugins / mod_tls.lua
index 707ae8f5aecb530430f0aa9e582b03ddb39323e7..80b56abbb41b8b6482ecf1846ea9cb75d2142a43 100644 (file)
@@ -25,6 +25,7 @@ if secure_s2s_only then s2s_feature:tag("required"):up(); end
 
 local global_ssl_ctx = prosody.global_ssl_ctx;
 
+local hosts = prosody.hosts;
 local host = hosts[module.host];
 
 local function can_do_tls(session)
@@ -91,10 +92,10 @@ module:hook_stanza(xmlns_starttls, "proceed", function (session, stanza)
 end);
 
 function module.load()
-       local ssl_config = config.rawget(module.host, "core", "ssl");
+       local ssl_config = config.rawget(module.host, "ssl");
        if not ssl_config then
                local base_host = module.host:match("%.(.*)");
-               ssl_config = config.get(base_host, "core", "ssl");
+               ssl_config = config.get(base_host, "ssl");
        end
        host.ssl_ctx = create_context(host.host, "client", ssl_config); -- for outgoing connections
        host.ssl_ctx_in = create_context(host.host, "server", ssl_config); -- for incoming connections