mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix key deletion in fido2
This commit is contained in:
parent
8974a86f24
commit
e9ae3fe72b
1 changed files with 8 additions and 4 deletions
|
|
@ -502,14 +502,18 @@ impl<'a> ActionManager<'a> {
|
|||
|
||||
if choice.is_none() {
|
||||
// we're dealing with FIDO stuff, use the custom code path
|
||||
match self.pddb.borrow().get(U2F_APP_DICT, entry.key_name.as_str().unwrap_or("UTF8-error"),
|
||||
None, false, false, None, None::<fn()>
|
||||
let dictionary = match entry.key_name.as_str().unwrap_or("UTF8-error").parse::<usize>() {
|
||||
Ok(fido_key) => persistent_store::store::OPENSK2_DICT,
|
||||
Err(_) => U2F_APP_DICT,
|
||||
};
|
||||
match self.pddb.borrow().get(dictionary, entry.key_name.as_str().unwrap_or("UTF8-error"),
|
||||
None, false, false, None, None::<fn()>
|
||||
) {
|
||||
Ok(candidate) => {
|
||||
let attr = candidate.attributes().expect("couldn't get key attributes");
|
||||
match self.pddb.borrow()
|
||||
.delete_key(
|
||||
U2F_APP_DICT,
|
||||
dictionary,
|
||||
entry.key_name.as_str().unwrap_or("UTF8-error"),
|
||||
Some(&attr.basis)
|
||||
) {
|
||||
|
|
@ -519,7 +523,7 @@ impl<'a> ActionManager<'a> {
|
|||
Err(e) => self.report_err(t!("vault.error.internal_error", xous::LANG), Some(e)),
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
Err(e) => {
|
||||
self.report_err(t!("vault.error.not_found", xous::LANG), Some(e));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue