Skip to content

Commit

Permalink
Merge pull request #198 from Nitrokey/update-trussed
Browse files Browse the repository at this point in the history
Update trussed
  • Loading branch information
robin-nitrokey authored Mar 4, 2024
2 parents 2a3f0b7 + fbef40a commit 1c844b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
8 changes: 6 additions & 2 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down Expand Up @@ -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| {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 1c844b7

Please sign in to comment.