mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
TLS tidy-up
This commit is contained in:
parent
d57c1143bb
commit
5cacb9c20e
2 changed files with 9 additions and 5 deletions
|
|
@ -53,7 +53,7 @@ pub fn shellchat<'a>(
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.collect();
|
.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 xns = XousNames::new().unwrap();
|
||||||
let modals = Modals::new(&xns).unwrap();
|
let modals = Modals::new(&xns).unwrap();
|
||||||
modals
|
modals
|
||||||
|
|
@ -159,7 +159,12 @@ pub fn shellchat<'a>(
|
||||||
}
|
}
|
||||||
None | _ => {
|
None | _ => {
|
||||||
write!(ret, "{}\n", t!("tls.cmd", locales::LANG)).ok();
|
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, "\thelp\n").ok();
|
||||||
write!(ret, "\tlist\t{}\n", t!("tls.list_cmd", locales::LANG)).ok();
|
write!(ret, "\tlist\t{}\n", t!("tls.list_cmd", locales::LANG)).ok();
|
||||||
#[cfg(feature = "rootCA")]
|
#[cfg(feature = "rootCA")]
|
||||||
|
|
|
||||||
|
|
@ -221,9 +221,8 @@ impl Tls {
|
||||||
let pos: u16 = u16::from_be_bytes([bytes[0], bytes[1]]);
|
let pos: u16 = u16::from_be_bytes([bytes[0], bytes[1]]);
|
||||||
let pos: usize = pos.into();
|
let pos: usize = pos.into();
|
||||||
// deserialize the trust-anchor
|
// deserialize the trust-anchor
|
||||||
let archive = unsafe {
|
let archive =
|
||||||
rkyv::archived_value::<RustlsOwnedTrustAnchor>(&bytes, pos)
|
unsafe { rkyv::archived_value::<RustlsOwnedTrustAnchor>(&bytes, pos) };
|
||||||
};
|
|
||||||
let ta = archive.deserialize(&mut AllocDeserializer {}).ok();
|
let ta = archive.deserialize(&mut AllocDeserializer {}).ok();
|
||||||
log::info!("get '{}' = '{:?}'", key, &ta);
|
log::info!("get '{}' = '{:?}'", key, &ta);
|
||||||
ta
|
ta
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue