X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_tls.lua;h=80b56abbb41b8b6482ecf1846ea9cb75d2142a43;hb=a250fef0d85ce72abc910f7ccf53e2830358990f;hp=cace2d693efb530b26eadb633342aa101d55533c;hpb=c269396a37a8bef1b71982f2cdd336324eb72d07;p=prosody.git diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index cace2d69..80b56abb 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -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) @@ -75,7 +76,7 @@ end); module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) module:log("debug", "Received features element"); if can_do_tls(session) and stanza:child_with_ns(xmlns_starttls) then - module:log("%s is offering TLS, taking up the offer...", session.to_host); + module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host); session.sends2s(""); return true; end @@ -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