From 3f04a35447fd31bfd113a6bc760a99532dc6f407 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Tue, 13 Jun 2023 23:58:17 -0400 Subject: [PATCH] ctap2-proto: Change &[u8] to fixed size arrays in authenticator::client_pin::{Request, Response} fields --- .../src/authenticator/client_pin/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/ctap2-proto/src/authenticator/client_pin/mod.rs b/crates/ctap2-proto/src/authenticator/client_pin/mod.rs index d3fd5a2..14d5232 100644 --- a/crates/ctap2-proto/src/authenticator/client_pin/mod.rs +++ b/crates/ctap2-proto/src/authenticator/client_pin/mod.rs @@ -17,20 +17,20 @@ pub enum Request<'a> { SetPin { version: auth_protocol::Version, key_agreement: cosey::PublicKey, - new_pin_encrypted: &'a [u8], - pin_uv_auth_param: &'a [u8], + new_pin_encrypted: [u8; 64], + pin_uv_auth_param: PinUvAuthParam, }, ChangePin { version: auth_protocol::Version, key_agreement: cosey::PublicKey, - pin_hash_encrypted: &'a [u8], - new_pin_encrypted: &'a [u8], - pin_uv_auth_param: &'a [u8], + pin_hash_encrypted: [u8; 16], + new_pin_encrypted: [u8; 64], + pin_uv_auth_param: PinUvAuthParam, }, GetPinToken { version: auth_protocol::Version, key_agreement: cosey::PublicKey, - pin_hash_encrypted: &'a [u8], + pin_hash_encrypted: [u8; 16], }, GetPinUvAuthTokenUsingUvWithPermissions { version: auth_protocol::Version, @@ -42,7 +42,7 @@ pub enum Request<'a> { GetPinUvAuthTokenUsingPinWithPermissions { version: auth_protocol::Version, key_agreement: cosey::PublicKey, - pin_hash_encrypted: usize, + pin_hash_encrypted: [u8; 16], permissions: &'a BTreeSet, // TODO: Enforce non-empty set? relying_party_id: Option, },