diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-26 17:17:43 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-27 10:15:18 +0100 |
commit | 9d14a859d80a0aac21dd493df9f97d70f9bd444e (patch) | |
tree | 627f040cb02fc7268195487f155877e001706ea2 /src/model | |
parent | a1d25078ccd6c83346c397ddd6caaadb16d0ef1f (diff) | |
download | garage-9d14a859d80a0aac21dd493df9f97d70f9bd444e.tar.gz garage-9d14a859d80a0aac21dd493df9f97d70f9bd444e.zip |
[sse-c] refactor read_and_put_blocks and handle encryption in PutObject
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/s3/object_table.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs index 20824e8d..7fa4b9e0 100644 --- a/src/model/s3/object_table.rs +++ b/src/model/s3/object_table.rs @@ -263,7 +263,9 @@ mod v010 { pub enum ObjectVersionData { /// The object was deleted, this Version is a tombstone to mark it as such DeleteMarker, - /// The object is short, it's stored inlined + /// The object is short, it's stored inlined. + /// It is never compressed. For encrypted objects, it is encrypted using + /// AES256-GCM, like the encrypted headers. Inline(ObjectVersionMeta, #[serde(with = "serde_bytes")] Vec<u8>), /// The object is not short, Hash of first block is stored here, next segments hashes are /// stored in the version table @@ -273,7 +275,8 @@ mod v010 { /// Metadata about the object version #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)] pub struct ObjectVersionMeta { - /// Size of the object + /// Size of the object. If object is encrypted/compressed, + /// this is always the size of the unencrypted/uncompressed data pub size: u64, /// etag of the object pub etag: String, |