# HG changeset patch # User Paul Aurich # Date 1335627334 25200 # Node ID 21c513a8995130eea46be6cc9b3564a37824818e # Parent 28e7664924bdcc8d9b90b2786ab5c2504d696627 mod_s2s: Log certificate errors, for troubleshooting goodness diff -r 28e7664924bd -r 21c513a89951 plugins/s2s/mod_s2s.lua --- a/plugins/s2s/mod_s2s.lua Sat Apr 28 16:29:00 2012 +0100 +++ b/plugins/s2s/mod_s2s.lua Sat Apr 28 08:35:34 2012 -0700 @@ -134,6 +134,9 @@ -- Is there any interest in printing out all/the number of errors here? if not chain_valid then (session.log or log)("debug", "certificate chain validation result: invalid"); + for depth, t in ipairs(errors) do + (session.log or log)("debug", "certificate error(s) at depth %d: %s", depth-1, table.concat(t, ", ")) + end session.cert_chain_status = "invalid"; else (session.log or log)("debug", "certificate chain validation result: valid");