Changeset

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
parents 5768:c892709f035d
children 5770:7722372aa087 5774:6ef79af0c445
files plugins/mod_admin_telnet.lua plugins/mod_s2s/mod_s2s.lua
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Tue Aug 06 14:31:20 2013 +0200
+++ b/plugins/mod_admin_telnet.lua	Tue Aug 06 14:32:31 2013 +0200
@@ -673,7 +673,7 @@
 -- I think there's going to be more confusion among operators if we
 -- break from that.
 local function print_errors(print, errors)
-	for depth, t in ipairs(errors) do
+	for depth, t in pairs(errors) do
 		print(
 			("    %d: %s"):format(
 				depth-1,
--- a/plugins/mod_s2s/mod_s2s.lua	Tue Aug 06 14:31:20 2013 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Tue Aug 06 14:32:31 2013 +0200
@@ -239,7 +239,7 @@
 		-- 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 or NULL) do
+			for depth, t in pairs(errors or NULL) do
 				(session.log or log)("debug", "certificate error(s) at depth %d: %s", depth-1, table.concat(t, ", "))
 			end
 			session.cert_chain_status = "invalid";