Software /
code /
prosody
Comparison
prosodyctl @ 8190:331caee0c774
prosodyctl: Skip certificate checks for hosts of the form node@host (fixes #779)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Aug 2017 20:27:43 +0200 |
parent | 8177:f52cdad171b0 |
child | 8198:db82ce3decee |
comparison
equal
deleted
inserted
replaced
8189:a3565d7dd304 | 8190:331caee0c774 |
---|---|
1334 if what == "certs" then cert_ok = false end | 1334 if what == "certs" then cert_ok = false end |
1335 elseif not load_cert then | 1335 elseif not load_cert then |
1336 print("This version of LuaSec (" .. ssl._VERSION .. ") does not support certificate checking"); | 1336 print("This version of LuaSec (" .. ssl._VERSION .. ") does not support certificate checking"); |
1337 cert_ok = false | 1337 cert_ok = false |
1338 else | 1338 else |
1339 for host in enabled_hosts() do | 1339 local function skip_bare_jid_hosts(host) |
1340 if jid_split(host) then | |
1341 -- See issue #779 | |
1342 return false; | |
1343 end | |
1344 return true; | |
1345 end | |
1346 for host in it.filter(skip_bare_jid_hosts, enabled_hosts()) do | |
1340 print("Checking certificate for "..host); | 1347 print("Checking certificate for "..host); |
1341 -- First, let's find out what certificate this host uses. | 1348 -- First, let's find out what certificate this host uses. |
1342 local host_ssl_config = config.rawget(host, "ssl") | 1349 local host_ssl_config = config.rawget(host, "ssl") |
1343 or config.rawget(host:match("%.(.*)"), "ssl"); | 1350 or config.rawget(host:match("%.(.*)"), "ssl"); |
1344 local global_ssl_config = config.rawget("*", "ssl"); | 1351 local global_ssl_config = config.rawget("*", "ssl"); |