From fbef40a2f1c6e9569339b233735d11205511ad1f Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 1 Mar 2024 17:06:23 +0100 Subject: [PATCH] Update trussed --- Cargo.toml | 5 +++-- src/state.rs | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 47a88b6..b36b20e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,11 +90,12 @@ log-error = [] [patch.crates-io] iso7816 = { git = "https://github.com/Nitrokey/iso7816.git", tag = "v0.1.1-nitrokey.1" } +littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" } p256-cortex-m4 = { git = "https://github.com/Nitrokey/p256-cortex-m4", tag = "v0.1.0-alpha.6-nitrokey-1" } -trussed = { git = "https://github.com/nitrokey/trussed" , tag = "v0.1.0-nitrokey.15" } +trussed = { git = "https://github.com/Nitrokey/trussed" , tag = "v0.1.0-nitrokey.18" } trussed-auth = { git = "https://github.com/trussed-dev/trussed-auth.git", rev = "4b8191f248c26cb074cdac887c7f3f48f9c449a4"} trussed-rsa-alloc = { git = "https://github.com/trussed-dev/trussed-rsa-backend.git", rev = "9732a9a3e98af72112286afdc9b7174c66c2869a" } -trussed-staging = { git = "https://github.com/trussed-dev/trussed-staging.git", rev = "10baac2608e98e25ea77ade974a4e26f778d6c8e" } +trussed-staging = { git = "https://github.com/Nitrokey/trussed-staging.git", tag = "v0.1.0-nitrokey-hmac256p256.3" } apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch", tag = "v0.1.2-nitrokey.2" } trussed-usbip = { git = "https://github.com/Nitrokey/pc-usbip-runner.git", tag = "v0.0.1-nitrokey.1" } usbd-ccid = { git = "https://github.com/Nitrokey/usbd-ccid", tag = "v0.2.0-nitrokey.1" } diff --git a/src/state.rs b/src/state.rs index 6206894..07f9269 100644 --- a/src/state.rs +++ b/src/state.rs @@ -331,6 +331,7 @@ impl<'a> LoadedState<'a> { admin_key, user_wrapped, ADMIN_USER_KEY_BACKUP.as_bytes(), + &[], StorageAttributes::new().set_persistence(Location::Volatile) )) .map_err(|_err| { @@ -358,6 +359,7 @@ impl<'a> LoadedState<'a> { rc_key, user_wrapped, RC_USER_KEY_BACKUP.as_bytes(), + &[], StorageAttributes::new().set_persistence(Location::Volatile) )) .map_err(|_err| { @@ -423,7 +425,8 @@ impl<'a> LoadedState<'a> { Mechanism::Chacha8Poly1305, rc_key, user_key, - RC_USER_KEY_BACKUP.as_bytes() + RC_USER_KEY_BACKUP.as_bytes(), + None, )) .wrapped_key; syscall!(client.write_file( @@ -760,7 +763,8 @@ impl Persistent { Mechanism::Chacha8Poly1305, admin_key, user_key, - ADMIN_USER_KEY_BACKUP.as_bytes() + ADMIN_USER_KEY_BACKUP.as_bytes(), + None, )) .wrapped_key; syscall!(client.write_file(location, PathBuf::from(ADMIN_USER_KEY_BACKUP), backup, None));