TLS tidy-up

This commit is contained in:
nworbnhoj 2023-09-11 09:37:09 +10:00
parent d57c1143bb
commit 5cacb9c20e
2 changed files with 9 additions and 5 deletions

View file

@ -53,7 +53,7 @@ pub fn shellchat<'a>(
)
})
.collect();
let mut count:u32 = rotas.len().try_into().unwrap();
let mut count: u32 = rotas.len().try_into().unwrap();
let xns = XousNames::new().unwrap();
let modals = Modals::new(&xns).unwrap();
modals
@ -159,7 +159,12 @@ pub fn shellchat<'a>(
}
None | _ => {
write!(ret, "{}\n", t!("tls.cmd", locales::LANG)).ok();
write!(ret, "\tdeleteall\t{}\n", t!("tls.deleteall_cmd", locales::LANG)).ok();
write!(
ret,
"\tdeleteall\t{}\n",
t!("tls.deleteall_cmd", locales::LANG)
)
.ok();
write!(ret, "\thelp\n").ok();
write!(ret, "\tlist\t{}\n", t!("tls.list_cmd", locales::LANG)).ok();
#[cfg(feature = "rootCA")]

View file

@ -221,9 +221,8 @@ impl Tls {
let pos: u16 = u16::from_be_bytes([bytes[0], bytes[1]]);
let pos: usize = pos.into();
// deserialize the trust-anchor
let archive = unsafe {
rkyv::archived_value::<RustlsOwnedTrustAnchor>(&bytes, pos)
};
let archive =
unsafe { rkyv::archived_value::<RustlsOwnedTrustAnchor>(&bytes, pos) };
let ta = archive.deserialize(&mut AllocDeserializer {}).ok();
log::info!("get '{}' = '{:?}'", key, &ta);
ta