Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
13228:616c578c644f | 13229:bb7177efbf41 |
---|---|
8 | 8 |
9 local create_context = require "prosody.core.certmanager".create_context; | 9 local create_context = require "prosody.core.certmanager".create_context; |
10 local rawgetopt = require"prosody.core.configmanager".rawget; | 10 local rawgetopt = require"prosody.core.configmanager".rawget; |
11 local st = require "prosody.util.stanza"; | 11 local st = require "prosody.util.stanza"; |
12 | 12 |
13 local c2s_require_encryption = module:get_option("c2s_require_encryption", module:get_option("require_encryption", true)); | 13 local c2s_require_encryption = module:get_option_boolean("c2s_require_encryption", module:get_option_boolean("require_encryption", true)); |
14 local s2s_require_encryption = module:get_option("s2s_require_encryption", true); | 14 local s2s_require_encryption = module:get_option_boolean("s2s_require_encryption", true); |
15 local allow_s2s_tls = module:get_option("s2s_allow_encryption") ~= false; | 15 local allow_s2s_tls = module:get_option_boolean("s2s_allow_encryption", true); |
16 local s2s_secure_auth = module:get_option("s2s_secure_auth"); | 16 local s2s_secure_auth = module:get_option_boolean("s2s_secure_auth", false); |
17 | 17 |
18 if s2s_secure_auth and s2s_require_encryption == false then | 18 if s2s_secure_auth and s2s_require_encryption == false then |
19 module:log("warn", "s2s_secure_auth implies s2s_require_encryption, but s2s_require_encryption is set to false"); | 19 module:log("warn", "s2s_secure_auth implies s2s_require_encryption, but s2s_require_encryption is set to false"); |
20 s2s_require_encryption = true; | 20 s2s_require_encryption = true; |
21 end | 21 end |