Skip to content

Commit

Permalink
Merge pull request trussed-dev#37 from Nitrokey/use-refs
Browse files Browse the repository at this point in the history
Use references
  • Loading branch information
sosthene-nitrokey authored Oct 2, 2023
2 parents 2326098 + 82a85dc commit 0a32941
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rand = "0.8.4"
features = ["dispatch"]

[patch.crates-io]
ctap-types = { git = "https://github.com/Nitrokey/ctap-types.git", rev = "42751efdc3c717135e8f26ceaa6ce23fb57d0498" }
ctap-types = { git = "https://github.com/nitrokey/ctap-types.git", rev = "0011b36d2a97779e77ff6f154b08008c9608f904" }
ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "57cb3317878a8593847595319aa03ef17c29ec5b" }
trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "51e68500d7601d04f884f5e95567d14b9018a6cb" }
serde-indexed = { git = "https://github.com/sosthene-nitrokey/serde-indexed.git", rev = "5005d23cb4ee8622e62188ea0f9466146f851f0d" }
4 changes: 2 additions & 2 deletions src/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub(crate) use ctap_types::{
// authenticator::{ctap1, ctap2, Error, Request, Response},
ctap2::credential_management::CredentialProtectionPolicy,
sizes::*,
webauthn::PublicKeyCredentialDescriptor,
webauthn::{PublicKeyCredentialDescriptor, PublicKeyCredentialDescriptorRef},
Bytes,
String,
};
Expand Down Expand Up @@ -276,7 +276,7 @@ impl Credential {
pub fn try_from<UP: UserPresence, T: client::Client + client::Chacha8Poly1305>(
authnr: &mut Authenticator<UP, T>,
rp_id_hash: &Bytes<32>,
descriptor: &PublicKeyCredentialDescriptor,
descriptor: &PublicKeyCredentialDescriptorRef,
) -> Result<Self> {
Self::try_from_bytes(authnr, rp_id_hash, &descriptor.id)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ctap2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ impl<UP: UserPresence, T: TrussedRequirements> crate::Authenticator<UP, T> {
fn pin_prechecks(
&mut self,
options: &Option<ctap2::AuthenticatorOptions>,
pin_auth: &Option<ctap2::PinAuth>,
pin_auth: &Option<&ctap2::PinAuth>,
pin_protocol: &Option<u32>,
data: &[u8],
) -> Result<bool> {
Expand Down

0 comments on commit 0a32941

Please sign in to comment.