From b5e33f889e33f1c07ec7c5528337dfcf1dfa1fa7 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Fri, 19 May 2023 22:17:43 -0400 Subject: [PATCH] ctap2-hid: All ctap commands need self reference --- crates/ctap2-proto/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/ctap2-proto/src/lib.rs b/crates/ctap2-proto/src/lib.rs index bc095de..a51cd0e 100644 --- a/crates/ctap2-proto/src/lib.rs +++ b/crates/ctap2-proto/src/lib.rs @@ -43,12 +43,15 @@ pub trait Ctap2_2Authenticator { /// > `pinUvAuthProtocol`) ensures that PINs are encrypted when sent to an /// > authenticator and are exchanged for a `pinUvAuthToken` that serves to /// > authenticate subsequent commands. - fn client_pin(request: client_pin::Request) -> Result; + fn client_pin( + &mut self, + request: client_pin::Request, + ) -> Result; #[allow(clippy::missing_errors_doc)] /// > This method is used by the client to reset an authenticator back to a /// > factory default state. - fn reset() -> Result<(), reset::Error>; + fn reset(&mut self) -> Result<(), reset::Error>; // fn bio_enrollment( // request: bio_enrollment::Request, @@ -64,7 +67,7 @@ pub trait Ctap2_2Authenticator { #[allow(clippy::missing_errors_doc)] /// > This command allows the platform to let a user select a certain /// > authenticator by asking for user presence. - fn selection() -> Result<(), authenticator::selection::Error>; + fn selection(&mut self) -> Result<(), authenticator::selection::Error>; // fn large_blobs() -> Result<(), ()>;