Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 5769:f6ea5b3739c9
mod_admin_telnet, mod_s2s: Fix reporting of certificate chain validation details
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 06 Aug 2013 14:32:31 +0200 |
parent | 5767:3a30ad76a86a |
child | 5770:7722372aa087 |
child | 5975:0d219631d47b |
comparison
equal
deleted
inserted
replaced
5768:c892709f035d | 5769:f6ea5b3739c9 |
---|---|
237 chain_valid, errors = false, { { "Chain verification not supported by this version of LuaSec" } }; | 237 chain_valid, errors = false, { { "Chain verification not supported by this version of LuaSec" } }; |
238 end | 238 end |
239 -- Is there any interest in printing out all/the number of errors here? | 239 -- Is there any interest in printing out all/the number of errors here? |
240 if not chain_valid then | 240 if not chain_valid then |
241 (session.log or log)("debug", "certificate chain validation result: invalid"); | 241 (session.log or log)("debug", "certificate chain validation result: invalid"); |
242 for depth, t in ipairs(errors or NULL) do | 242 for depth, t in pairs(errors or NULL) do |
243 (session.log or log)("debug", "certificate error(s) at depth %d: %s", depth-1, table.concat(t, ", ")) | 243 (session.log or log)("debug", "certificate error(s) at depth %d: %s", depth-1, table.concat(t, ", ")) |
244 end | 244 end |
245 session.cert_chain_status = "invalid"; | 245 session.cert_chain_status = "invalid"; |
246 else | 246 else |
247 (session.log or log)("debug", "certificate chain validation result: valid"); | 247 (session.log or log)("debug", "certificate chain validation result: valid"); |