Skip to content

Commit

Permalink
Update cbor-smol dependency to v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Oct 22, 2024
1 parent 7a84e08 commit 09e3f60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## [Unreleased][]

-
### Changed

- Update `cbor-smol` dependency to v0.5.0

[Unreleased]: https://github.com/trussed-dev/trussed-staging/compare/v0.3.0...HEAD

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ iso7816 = "0.1.1"
hmac = "0.12.1"
rand = { version = "0.8.5", default-features = false }
littlefs2 = "0.4.0"
cbor-smol = "0.4.0"
cbor-smol = { version = "0.5.0", features = ["heapless-bytes-v0-3"] }
serde_bytes = { version = "0.11.12", default-features = false }
trussed-rsa-alloc = "0.2.1"
postcard = "0.7.3"
Expand Down
4 changes: 3 additions & 1 deletion src/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ impl UnsealedKey {
// encoding: |map(2) | text(1) | "d" | bytes (len as u16) | MAX_SERIALIZED_KEY_LENGTH | data
// | text(1) | "k" | array(1 if core, 2 if se050) | discriminator | (discriminiator) if se050 |
fn serialize(&self) -> Bytes<{ MAX_SERIALIZED_KEY_LENGTH + 11 + HPKE_OVERHEAD }> {
cbor_smol::cbor_serialize_bytes(&self).unwrap()
let mut data = Bytes::new();
cbor_smol::cbor_serialize_to(&self, &mut data).unwrap();
data
}
fn try_deserialize(data: &[u8]) -> Result<Self, Error> {
cbor_smol::cbor_deserialize(data).map_err(|_| Error::CborError)
Expand Down

0 comments on commit 09e3f60

Please sign in to comment.