mod_admin_telnet, mod_s2s: Fix reporting of certificate chain validation details
authorKim Alvefur <zash@zash.se>
Tue, 6 Aug 2013 12:32:31 +0000 (14:32 +0200)
committerKim Alvefur <zash@zash.se>
Tue, 6 Aug 2013 12:32:31 +0000 (14:32 +0200)
plugins/mod_admin_telnet.lua
plugins/mod_s2s/mod_s2s.lua

index b942e9bd8efce95db07c93a53f3c10ab6f002ee0..131689c5fc73e58288e730ca3defe99a5d09e97e 100644 (file)
@@ -673,7 +673,7 @@ end
 -- 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,
index 950155268557483bd93a1a75800629699834f11a..bb46cd2fd66cd6d4b2e0d8e941b474fbf8bb7bd5 100644 (file)
@@ -239,7 +239,7 @@ local function check_cert_status(session)
                -- 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";