Software /
code /
prosody
Comparison
plugins/mod_admin_shell.lua @ 13079:e7a5e5a0dc02
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 19 Apr 2023 11:42:36 +0200 |
parent | 13072:7fcf41b541e0 |
parent | 13077:de42a93a7c8d |
child | 13089:41598b7ec543 |
comparison
equal
deleted
inserted
replaced
13076:f4e33d17eaa8 | 13079:e7a5e5a0dc02 |
---|---|
901 description = "Validation status of certificate"; | 901 description = "Validation status of certificate"; |
902 key = "cert_identity_status"; | 902 key = "cert_identity_status"; |
903 width = math.max(#"Expired", #"Self-signed", #"Untrusted", #"Mismatched", #"Unknown"); | 903 width = math.max(#"Expired", #"Self-signed", #"Untrusted", #"Mismatched", #"Unknown"); |
904 mapper = function(cert_status, session) | 904 mapper = function(cert_status, session) |
905 if cert_status then return capitalize(cert_status); end | 905 if cert_status then return capitalize(cert_status); end |
906 if session.cert_chain_status == "Invalid" then | 906 if session.cert_chain_status == "invalid" then |
907 local cert_errors = set.new(session.cert_chain_errors[1]); | 907 local cert_errors = set.new(session.cert_chain_errors[1]); |
908 if cert_errors:contains("certificate has expired") then | 908 if cert_errors:contains("certificate has expired") then |
909 return "Expired"; | 909 return "Expired"; |
910 elseif cert_errors:contains("self signed certificate") then | 910 elseif cert_errors:contains("self signed certificate") then |
911 return "Self-signed"; | 911 return "Self-signed"; |