Comparison

plugins/mod_admin_shell.lua @ 13077:de42a93a7c8d 0.12

mod_admin_shell: Fix display of remote cert status when expired etc Looks like autocomplete unhelpfully capitalized this word, but it's lowercase where it is set in mod_s2s_auth_certs
author Kim Alvefur <zash@zash.se>
date Thu, 06 Apr 2023 17:09:03 +0200
parent 12887:68df46926c26
child 13079:e7a5e5a0dc02
child 13488:b2b090181270
comparison
equal deleted inserted replaced
13057:20b1526772d2 13077:de42a93a7c8d
827 description = "Validation status of certificate"; 827 description = "Validation status of certificate";
828 key = "cert_identity_status"; 828 key = "cert_identity_status";
829 width = 11; 829 width = 11;
830 mapper = function(cert_status, session) 830 mapper = function(cert_status, session)
831 if cert_status then return capitalize(cert_status); end 831 if cert_status then return capitalize(cert_status); end
832 if session.cert_chain_status == "Invalid" then 832 if session.cert_chain_status == "invalid" then
833 local cert_errors = set.new(session.cert_chain_errors[1]); 833 local cert_errors = set.new(session.cert_chain_errors[1]);
834 if cert_errors:contains("certificate has expired") then 834 if cert_errors:contains("certificate has expired") then
835 return "Expired"; 835 return "Expired";
836 elseif cert_errors:contains("self signed certificate") then 836 elseif cert_errors:contains("self signed certificate") then
837 return "Self-signed"; 837 return "Self-signed";