From 6991baa5315754e45fd0ad7085811d0189ecab1c Mon Sep 17 00:00:00 2001 From: Fabian Kaczmarczyck Date: Thu, 5 Sep 2024 15:43:29 +0200 Subject: [PATCH] Allows GetInfo while from other channels While we still don't support multiple channels, at least a GetInfo is acceptable for concurrent communication. --- libraries/opensk/src/ctap/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/opensk/src/ctap/mod.rs b/libraries/opensk/src/ctap/mod.rs index b457de27..c4278c35 100644 --- a/libraries/opensk/src/ctap/mod.rs +++ b/libraries/opensk/src/ctap/mod.rs @@ -640,7 +640,9 @@ impl CtapState { // The auth token timeouts are checked once here, to make error codes consistent. If your // auth token hasn't timed out now, you can fully use it for this command. self.client_pin.update_timeouts(env); - self.clear_other_channels(channel); + if !matches!(&command, Command::AuthenticatorGetInfo) { + self.clear_other_channels(channel); + } match (&command, self.stateful_command_permission.get_command(env)) { (Command::AuthenticatorGetNextAssertion, Ok(StatefulCommand::GetAssertion(_))) | (Command::AuthenticatorLargeBlobs(_), Ok(StatefulCommand::LargeBlob(_)))