mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
display tls certificate subject & serial in check_trust modal
This commit is contained in:
parent
0d1e89e560
commit
472e4407b8
1 changed files with 9 additions and 2 deletions
|
|
@ -110,10 +110,17 @@ pub fn check_trust(certificates: &[Certificate]) -> bool {
|
||||||
|
|
||||||
let chain: Vec<String> = certificates
|
let chain: Vec<String> = certificates
|
||||||
.iter()
|
.iter()
|
||||||
.map(|x509| format!("{}", &x509.tbs_certificate.issuer()))
|
.map(|x509| {
|
||||||
|
let subject = x509.subject();
|
||||||
|
format!(
|
||||||
|
"{}\n{}\n{}",
|
||||||
|
&subject,
|
||||||
|
&x509.raw_serial_as_string()[0..24],
|
||||||
|
&x509.raw_serial_as_string()[24..],
|
||||||
|
)
|
||||||
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let chain: Vec<&str> = chain.iter().map(AsRef::as_ref).collect();
|
let chain: Vec<&str> = chain.iter().map(AsRef::as_ref).collect();
|
||||||
|
|
||||||
modals
|
modals
|
||||||
.add_list(chain)
|
.add_list(chain)
|
||||||
.expect("couldn't build checkbox list");
|
.expect("couldn't build checkbox list");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue