Skip to content

Commit

Permalink
fixup! Update cbor-smol to v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Oct 21, 2024
1 parent 9474231 commit ad68133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/trussed-dev/ctap-types"
[dependencies]
arbitrary = { version = "1.3.2", features = ["derive"], optional = true }
bitflags = "1.3"
cbor-smol = { version = "0.5", features = ["heapless-bytes-v0-3"] }
cbor-smol = { version = "0.5", features = ["heapless-v0-7"] }
cosey = "0.3.1"
delog = "0.1"
heapless = { version = "0.7", default-features = false, features = ["serde"] }
Expand Down
5 changes: 4 additions & 1 deletion src/ctap2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
//!
//! Note that all ctap2::Authenticators automatically implement RPC with [`Request`] and
//! [`Response`].
use core::ops::DerefMut;

use bitflags::bitflags;
use cbor_smol::cbor_deserialize;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -242,7 +244,8 @@ impl<'a, A: SerializeAttestedCredentialData, E: serde::Serialize> AuthenticatorD

// the extensions data
if let Some(extensions) = self.extensions.as_ref() {
cbor_smol::cbor_serialize_to(extensions, &mut bytes).map_err(|_| Error::Other)?;
cbor_smol::cbor_serialize_to(extensions, bytes.deref_mut())
.map_err(|_| Error::Other)?;
}

Ok(bytes)
Expand Down

0 comments on commit ad68133

Please sign in to comment.