Skip to content

Commit

Permalink
Call finalize_result after CTAP1 MakeCredentials requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jschanck committed Sep 11, 2023
1 parent fc99667 commit 2cff8a5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ctap2/commands/make_credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,16 +477,19 @@ impl RequestCtap1 for MakeCredentials {
return Err(Retryable::Error(HIDError::ApduStatus(err)));
}

MakeCredentialsResult::from_ctap1(input, &self.rp.hash())
.map_err(HIDError::Command)
.map_err(Retryable::Error)
let mut output = MakeCredentialsResult::from_ctap1(input, &self.rp.hash())
.map_err(|e| Retryable::Error(HIDError::Command(e)))?;
self.finalize_result(&mut output);
Ok(output)
}

fn send_to_virtual_device<Dev: VirtualFidoDevice>(
&self,
dev: &mut Dev,
) -> Result<Self::Output, HIDError> {
dev.make_credentials(self)
let mut output = dev.make_credentials(self)?;
self.finalize_result(&mut output);
Ok(output)
}
}

Expand Down

0 comments on commit 2cff8a5

Please sign in to comment.