Close XCA parity gaps: advanced extensions, CA/revocation UI, imports, ZIP export, E2E
This commit is contained in:
@@ -124,7 +124,7 @@ fn flat_html(rows: &[CertificateSummary], vault_id: &str) -> String {
|
||||
escape(&cert.issuer_name),
|
||||
if cert.is_ca { "CA" } else { "end entity" },
|
||||
escape(&cert.serial_hex),
|
||||
fmt_date(&cert.not_after),
|
||||
if cert.no_expiration { "No expiration".to_string() } else { fmt_date(&cert.not_after) },
|
||||
badge_class,
|
||||
badge_label,
|
||||
if cert.has_private_key { " <span class=\"badge badge-soft\">key</span>" } else { "" },
|
||||
@@ -146,7 +146,10 @@ fn tree_html(rows: &[CertificateSummary], vault_id: &str) -> String {
|
||||
for cert in rows {
|
||||
match &cert.issuer_id {
|
||||
Some(issuer) if ids.contains(issuer) && issuer != &cert.id => {
|
||||
children.entry(issuer.clone()).or_default().push(cert.clone());
|
||||
children
|
||||
.entry(issuer.clone())
|
||||
.or_default()
|
||||
.push(cert.clone());
|
||||
}
|
||||
_ => roots.push(cert.clone()),
|
||||
}
|
||||
@@ -200,5 +203,9 @@ fn node_html(
|
||||
}
|
||||
|
||||
fn escape(value: &str) -> String {
|
||||
value.replace('&', "&").replace('<', "<").replace('>', ">").replace('"', """)
|
||||
value
|
||||
.replace('&', "&")
|
||||
.replace('<', "<")
|
||||
.replace('>', ">")
|
||||
.replace('"', """)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user