Skip to content

Commit

Permalink
Fix credential listing with multiple RP
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Feb 14, 2024
1 parent 280bcde commit 5579fbd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/ctap2/credential_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ where
let mut current_id_hex = get_id_hex(&current_rp);

while let Some(entry) = syscall!(self.trussed.read_dir_next()).entry {
let id_hex = get_id_hex(&current_rp);
let id_hex = get_id_hex(&entry);
if id_hex != current_id_hex {
total_rps += 1;
current_rp = entry;
Expand Down Expand Up @@ -232,11 +232,12 @@ where

let dir = PathBuf::from(b"rk");

let maybe_next_rp =
syscall!(self
.trussed
.read_dir_first(Location::Internal, dir, Some(filename)))
.entry;
let maybe_next_rp = syscall!(self.trussed.read_dir_first_alphabetical(
Location::Internal,
dir,
Some(filename)
))
.entry;

let mut response = Response::default();

Expand Down

0 comments on commit 5579fbd

Please sign in to comment.