diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-23 19:31:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-27 10:15:17 +0100 |
commit | 439e7cb39f76852494ff9eb8ead499e29685af3f (patch) | |
tree | 8a5610874454381b630552b25cef54c1529475af /src/api/s3/get.rs | |
parent | 80ffbc7d9a53e00317281e8f62d902cb464bfc81 (diff) | |
download | garage-439e7cb39f76852494ff9eb8ead499e29685af3f.tar.gz garage-439e7cb39f76852494ff9eb8ead499e29685af3f.zip |
[sse-c] WIP: DecryptStream
Diffstat (limited to 'src/api/s3/get.rs')
-rw-r--r-- | src/api/s3/get.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/api/s3/get.rs b/src/api/s3/get.rs index 3f85eecb..9fe4d63e 100644 --- a/src/api/s3/get.rs +++ b/src/api/s3/get.rs @@ -329,11 +329,7 @@ async fn handle_get_full( }); let stream_block_0 = encryption - .get_and_decrypt_block( - &garage, - &first_block_hash, - Some(order_stream.order(0)), - ) + .get_block(&garage, &first_block_hash, Some(order_stream.order(0))) .await?; tx.send(stream_block_0) @@ -343,11 +339,7 @@ async fn handle_get_full( let version = version_fut.await.unwrap()?.ok_or(Error::NoSuchKey)?; for (i, (_, vb)) in version.blocks.items().iter().enumerate().skip(1) { let stream_block_i = encryption - .get_and_decrypt_block( - &garage, - &vb.hash, - Some(order_stream.order(i as u64)), - ) + .get_block(&garage, &vb.hash, Some(order_stream.order(i as u64))) .await?; tx.send(stream_block_i) .await @@ -544,7 +536,7 @@ fn body_from_blocks_range( let garage = garage.clone(); for (i, (block, block_offset)) in blocks.iter().enumerate() { let block_stream = encryption - .get_and_decrypt_block(&garage, &block.hash, Some(order_stream.order(i as u64))) + .get_block(&garage, &block.hash, Some(order_stream.order(i as u64))) .await?; let block_stream = block_stream .scan(*block_offset, move |chunk_offset, chunk| { |