Comparison

mod_auth_ccert/mod_auth_ccert.lua @ 1070:dee31eeae7ae

mod_auth_ccert: Fix logging of certificate chain errors
author Kim Alvefur <zash@zash.se>
date Fri, 14 Jun 2013 20:29:15 +0200
parent 1069:d7719bf1aed6
child 1092:f46307e8e2f8
comparison
equal deleted inserted replaced
1069:d7719bf1aed6 1070:dee31eeae7ae
79 79
80 local chain_valid, chain_errors = sock:getpeerverification(); 80 local chain_valid, chain_errors = sock:getpeerverification();
81 if not chain_valid then 81 if not chain_valid then
82 (session.log or log)("warn", "Invalid client certificate chain"); 82 (session.log or log)("warn", "Invalid client certificate chain");
83 for i, error in ipairs(chain_errors) do 83 for i, error in ipairs(chain_errors) do
84 (session.log or log)("warn", "%d: %s", i, table.concat(chain_errors, ", ")); 84 (session.log or log)("warn", "%d: %s", i, table.concat(chain_errors[i], ", "));
85 end 85 end
86 return nil, false; 86 return nil, false;
87 end 87 end
88 88
89 return find_username(cert, authz, session); 89 return find_username(cert, authz, session);