From c5371af97311e5ff5e45fa4f95e257761f9ac6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 24 Jul 2024 16:05:41 +0200 Subject: [PATCH] Fix CI --- Cargo.toml | 4 ++-- src/wrap_key_to_file.rs | 2 +- tests/wrap_key_to_file.rs | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8392b37..2bf1abf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,8 +66,8 @@ log-warn = [] log-error = [] [patch.crates-io] -trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "45ed62ba97d994aa6e05e2b61cea013ef131caa4" } -littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" } +trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "a055e4f79a10122c8c0c882161442e6e02f0c5c6" } +littlefs2 = { git = "https://github.com/trussed-dev/littlefs2.git", rev = "960e57d9fc0d209308c8e15dc26252bbe1ff6ba8" } trussed-chunked = { path = "extensions/chunked" } trussed-hkdf = { path = "extensions/hkdf" } diff --git a/src/wrap_key_to_file.rs b/src/wrap_key_to_file.rs index d8d9307..81b1a6a 100644 --- a/src/wrap_key_to_file.rs +++ b/src/wrap_key_to_file.rs @@ -89,7 +89,7 @@ fn unwrap_key_from_file( let nonce = (&*nonce).try_into().unwrap(); let tag = (&*tag).try_into().unwrap(); - let key = keystore.load_key(key::Secrecy::Secret, Some(KIND), &request.key)?; + let key = keystore.load_key(Secrecy::Secret, Some(KIND), &request.key)?; let chachakey: [u8; KEY_LEN] = (&*key.material).try_into().unwrap(); let mut aead = ChaCha8Poly1305::new(&GenericArray::clone_from_slice(&chachakey)); if aead diff --git a/tests/wrap_key_to_file.rs b/tests/wrap_key_to_file.rs index 84482b7..b31f53e 100644 --- a/tests/wrap_key_to_file.rs +++ b/tests/wrap_key_to_file.rs @@ -48,12 +48,13 @@ fn chacha_wrapkey() { let key2 = syscall!(client.generate_secret_key(32, Volatile)).key; let wrapped = - syscall!(client.wrap_key(Mechanism::Chacha8Poly1305, key, key2, &[])).wrapped_key; + syscall!(client.wrap_key(Mechanism::Chacha8Poly1305, key, key2, &[], None)).wrapped_key; let unwrapped = syscall!(client.unwrap_key( Mechanism::Chacha8Poly1305, key, wrapped, &[], + &[], StorageAttributes::new() )) .key @@ -61,12 +62,14 @@ fn chacha_wrapkey() { assert_key_eq(key2, unwrapped, client); let wrapped_ad = - syscall!(client.wrap_key(Mechanism::Chacha8Poly1305, key, key2, b"abc")).wrapped_key; + syscall!(client.wrap_key(Mechanism::Chacha8Poly1305, key, key2, b"abc", None)) + .wrapped_key; assert!(syscall!(client.unwrap_key( Mechanism::Chacha8Poly1305, key, wrapped_ad.clone(), &[], + &[], StorageAttributes::new() )) .key @@ -76,6 +79,7 @@ fn chacha_wrapkey() { key, wrapped_ad, b"abc", + &[], StorageAttributes::new() )) .key