fix fido readback from test vectors made in hosted mode

This commit is contained in:
bunnie 2022-09-17 00:39:19 +08:00
parent 1766611bb6
commit fad3aa6ec0

View file

@ -573,6 +573,7 @@ pub(crate) fn deserialize_app_info(descriptor: Vec::<u8>) -> Option::<AppInfo> {
log::trace!("invalid line skipped: {:?}", line);
}
}
#[cfg(any(target_os = "none", target_os = "xous"))]
if appinfo.name.len() > 0
&& appinfo.id != [0u8; 32]
&& appinfo.ctime != 0 { // atime can be 0 - indicates never used
@ -580,6 +581,13 @@ pub(crate) fn deserialize_app_info(descriptor: Vec::<u8>) -> Option::<AppInfo> {
} else {
None
}
#[cfg(not(any(target_os = "none", target_os = "xous")))]
if appinfo.name.len() > 0
&& appinfo.id != [0u8; 32] { // atime can be 0 - indicates never used. In hosted mode, ctime is 0.
Some(appinfo)
} else {
None
}
} else {
None
}