mirror of
https://github.com/solokeys/admin-app.git
synced 2026-06-20 13:16:17 -07:00
Update cbor-smol to v0.5.0
This commit is contained in:
+1
-2
@@ -11,7 +11,7 @@ description = "Administrative Trussed app for SoloKeys Solo 2 security keys"
|
||||
|
||||
[dependencies]
|
||||
apdu-app = "0.1"
|
||||
cbor-smol = { version = "0.4.0", features = ["heapless-v0-7", "heapless-bytes-v0-3"] }
|
||||
cbor-smol = { version = "0.5.0", features = ["heapless-v0-7", "heapless-bytes-v0-3"] }
|
||||
ctaphid-dispatch = "0.1"
|
||||
delog = "0.1"
|
||||
iso7816 = "0.1"
|
||||
@@ -47,4 +47,3 @@ littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27
|
||||
trussed = { git = "https://github.com/Nitrokey/trussed.git", tag = "v0.1.0-nitrokey.18" }
|
||||
trussed-manage = { git = "https://github.com/trussed-dev/trussed-staging.git", tag = "manage-v0.1.0" }
|
||||
trussed-se050-manage = { git = "https://github.com/Nitrokey/trussed-se050-backend.git", tag = "se050-manage-v0.1.0" }
|
||||
cbor-smol = { git = "https://github.com/trussed-dev/cbor-smol.git", rev = "4a368461e06e3ca52d79638b9ab8f34b038491fc" }
|
||||
|
||||
+5
-4
@@ -4,7 +4,7 @@ use core::{
|
||||
sync::atomic::{AtomicU8, Ordering},
|
||||
};
|
||||
|
||||
use cbor_smol::{cbor_deserialize, cbor_serialize_bytes};
|
||||
use cbor_smol::{cbor_deserialize, cbor_serialize_to};
|
||||
use littlefs2::{path, path::Path};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use strum_macros::FromRepr;
|
||||
@@ -303,8 +303,8 @@ pub fn save_filestore<F: Filestore, C: Config>(
|
||||
.map_err(|_| ConfigError::WriteFailed)?;
|
||||
}
|
||||
} else {
|
||||
let data: Message =
|
||||
cbor_serialize_bytes(config).map_err(|_| ConfigError::SerializationFailed)?;
|
||||
let mut data = Message::new();
|
||||
cbor_serialize_to(config, &mut data).map_err(|_| ConfigError::SerializationFailed)?;
|
||||
store
|
||||
.write(FILENAME, LOCATION, &data)
|
||||
.map_err(|_| ConfigError::SerializationFailed)?;
|
||||
@@ -319,7 +319,8 @@ pub fn save<T: Client, C: Config>(client: &mut T, config: &C) -> Result<(), Conf
|
||||
.map_err(|_| ConfigError::WriteFailed)?;
|
||||
}
|
||||
} else {
|
||||
let data = cbor_serialize_bytes(config).map_err(|_| ConfigError::SerializationFailed)?;
|
||||
let mut data = Message::new();
|
||||
cbor_serialize_to(config, &mut data).map_err(|_| ConfigError::SerializationFailed)?;
|
||||
try_syscall!(client.write_file(LOCATION, FILENAME.into(), data, None))
|
||||
.map_err(|_| ConfigError::WriteFailed)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user