From 408c4864dac4d46ea49265b79977c49b20ae4cd2 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Wed, 14 Jun 2023 00:00:09 -0400 Subject: [PATCH] ctap2-proto: Specify relying_party_id type as Cow<'a, str> in authenticator::client_pin::Request variant fields --- crates/ctap2-proto/src/authenticator/client_pin/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ctap2-proto/src/authenticator/client_pin/mod.rs b/crates/ctap2-proto/src/authenticator/client_pin/mod.rs index 9509c39..7233b11 100644 --- a/crates/ctap2-proto/src/authenticator/client_pin/mod.rs +++ b/crates/ctap2-proto/src/authenticator/client_pin/mod.rs @@ -1,5 +1,5 @@ use bounded_integer::BoundedUsize; -use std::collections::BTreeSet; +use std::{borrow::Cow, collections::BTreeSet}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -36,7 +36,7 @@ pub enum Request<'a> { version: auth_protocol::Version, key_agreement: cosey::PublicKey, permissions: &'a BTreeSet, // TODO: Enforce non-empty set? - relying_party_id: Option, + relying_party_id: Option>, }, GetUvRetries, GetPinUvAuthTokenUsingPinWithPermissions { @@ -44,7 +44,7 @@ pub enum Request<'a> { key_agreement: cosey::PublicKey, pin_hash_encrypted: [u8; 16], permissions: &'a BTreeSet, // TODO: Enforce non-empty set? - relying_party_id: Option, + relying_party_id: Option>, }, }