mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
refine the heuristic for detecting keys
This commit is contained in:
parent
e9ae3fe72b
commit
fd4e402d98
1 changed files with 9 additions and 3 deletions
|
|
@ -502,9 +502,15 @@ impl<'a> ActionManager<'a> {
|
||||||
|
|
||||||
if choice.is_none() {
|
if choice.is_none() {
|
||||||
// we're dealing with FIDO stuff, use the custom code path
|
// we're dealing with FIDO stuff, use the custom code path
|
||||||
let dictionary = match entry.key_name.as_str().unwrap_or("UTF8-error").parse::<usize>() {
|
let dictionary = match usize::from_str_radix(entry.key_name.as_str().unwrap_or("UTF8-error"), 10) {
|
||||||
Ok(fido_key) => persistent_store::store::OPENSK2_DICT,
|
Ok(fido_key) => {
|
||||||
Err(_) => U2F_APP_DICT,
|
if vault::ctap::storage::key::CREDENTIALS.contains(&fido_key) {
|
||||||
|
persistent_store::store::OPENSK2_DICT // heuristic: all fido2 keys are simple integers
|
||||||
|
} else {
|
||||||
|
U2F_APP_DICT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(_) => U2F_APP_DICT, // u2f keys are long hex strings
|
||||||
};
|
};
|
||||||
match self.pddb.borrow().get(dictionary, entry.key_name.as_str().unwrap_or("UTF8-error"),
|
match self.pddb.borrow().get(dictionary, entry.key_name.as_str().unwrap_or("UTF8-error"),
|
||||||
None, false, false, None, None::<fn()>
|
None, false, false, None, None::<fn()>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue