Software /
code /
prosody
Diff
plugins/mod_tls.lua @ 13229:bb7177efbf41
plugins: Use boolean config method in some places
Because it makes sense and improves feedback via logging
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 18 Jul 2023 12:38:16 +0200 |
parent | 13076:f4e33d17eaa8 |
line wrap: on
line diff
--- a/plugins/mod_tls.lua Tue Jul 18 12:36:47 2023 +0200 +++ b/plugins/mod_tls.lua Tue Jul 18 12:38:16 2023 +0200 @@ -10,10 +10,10 @@ local rawgetopt = require"prosody.core.configmanager".rawget; local st = require "prosody.util.stanza"; -local c2s_require_encryption = module:get_option("c2s_require_encryption", module:get_option("require_encryption", true)); -local s2s_require_encryption = module:get_option("s2s_require_encryption", true); -local allow_s2s_tls = module:get_option("s2s_allow_encryption") ~= false; -local s2s_secure_auth = module:get_option("s2s_secure_auth"); +local c2s_require_encryption = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", true)); +local s2s_require_encryption = module:get_option_boolean("s2s_require_encryption", true); +local allow_s2s_tls = module:get_option_boolean("s2s_allow_encryption", true); +local s2s_secure_auth = module:get_option_boolean("s2s_secure_auth", false); 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");