# HG changeset patch # User Kim Alvefur # Date 1389822470 -3600 # Node ID 177f233b5211f1881fdcce25e6134bbcd4aaea6d # Parent bd90250ee1eef82567416e3c4fb5ac997abfc596 mod_tls: Let s2s_secure_auth override s2s_require_encryption and warn if they differ diff -r bd90250ee1ee -r 177f233b5211 plugins/mod_tls.lua --- a/plugins/mod_tls.lua Wed Jan 15 21:57:15 2014 +0100 +++ b/plugins/mod_tls.lua Wed Jan 15 22:47:50 2014 +0100 @@ -13,6 +13,12 @@ local c2s_require_encryption = module:get_option("c2s_require_encryption") or module:get_option("require_encryption"); local s2s_require_encryption = module:get_option("s2s_require_encryption"); local allow_s2s_tls = module:get_option("s2s_allow_encryption") ~= false; +local s2s_secure_auth = module:get_option("s2s_secure_auth"); + +if s2s_secure_auth and s2s_require_encryption == false then + module:log("warn", "s2s_secure_auth implies s2s_require_encryption, but s2s_require_encryption is set to false"); + s2s_require_encryption = true; +end local xmlns_starttls = 'urn:ietf:params:xml:ns:xmpp-tls'; local starttls_attr = { xmlns = xmlns_starttls };