diff --git a/Cargo.toml b/Cargo.toml index 9dc6a04..463b14d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,4 +41,4 @@ log-warn = [] log-error = [] [patch.crates-io] -trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "51e68500d7601d04f884f5e95567d14b9018a6cb" } +trussed = { git = "https://github.com/trussed-dev/trussed.git", rev = "df720980888e3e0d5487250bd14a28db02a5f13b" } diff --git a/src/streaming/mod.rs b/src/streaming/mod.rs index d31d2aa..dd4ba1d 100644 --- a/src/streaming/mod.rs +++ b/src/streaming/mod.rs @@ -430,7 +430,7 @@ impl ExtensionImpl for super::StagingBackend { resources: &mut ServiceResources

, ) -> Result { let rng = &mut resources.rng()?; - let keystore = &mut resources.keystore(core_ctx)?; + let keystore = &mut resources.keystore(core_ctx.path.clone())?; let filestore = &mut resources.filestore(core_ctx.path.clone()); let client_id = &core_ctx.path; let store = resources.platform_mut().store(); @@ -482,7 +482,8 @@ impl ExtensionImpl for super::StagingBackend { Ok(reply::WriteChunk {}.into()) } ChunkedRequest::AbortChunkedWrite(_request) => { - let Some(ChunkedIoState::Write(ref write_state)) = backend_ctx.chunked_io_state else { + let Some(ChunkedIoState::Write(ref write_state)) = backend_ctx.chunked_io_state + else { return Ok(reply::AbortChunkedWrite { aborted: false }.into()); }; let aborted = store::abort_chunked_write( @@ -673,7 +674,9 @@ fn read_encrypted_chunk( ctx: &mut StagingContext, ) -> Result { let Some(ChunkedIoState::EncryptedRead(ref mut read_state)) = ctx.chunked_io_state else { - unreachable!("Read encrypted chunk can only be called in the context encrypted chunk reads"); + unreachable!( + "Read encrypted chunk can only be called in the context encrypted chunk reads" + ); }; let (mut data, len): (Bytes<{ MAX_MESSAGE_LENGTH + POLY1305_TAG_LEN }>, usize) = store::filestore_read_chunk( diff --git a/src/wrap_key_to_file/mod.rs b/src/wrap_key_to_file/mod.rs index 7958337..49ee1ec 100644 --- a/src/wrap_key_to_file/mod.rs +++ b/src/wrap_key_to_file/mod.rs @@ -248,7 +248,7 @@ impl ExtensionImpl for super::StagingBackend { request: &WrapKeyToFileRequest, resources: &mut ServiceResources

, ) -> Result { - let keystore = &mut resources.keystore(core_ctx)?; + let keystore = &mut resources.keystore(core_ctx.path.clone())?; let filestore = &mut resources.filestore(core_ctx.path.clone()); match request { WrapKeyToFileRequest::WrapKeyToFile(request) => {