]> git.proxmox.com Git - proxmox-backup.git/commit
blobs: attempt to verify on decode when possible
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 3 Aug 2020 12:10:43 +0000 (14:10 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 4 Aug 2020 05:27:56 +0000 (07:27 +0200)
commit8819d1f2f553d0f5dfa458aaaec3faf24ff26bff
treeec750871bf0bed19855cb595ef98914b796f1378
parent0f9218079aed5a2a13d338f09b2b6f3037c01f68
blobs: attempt to verify on decode when possible

regular chunks are only decoded when their contents are accessed, in
which case we need to have the key anyway and want to verify the digest.

for blobs we need to verify beforehand, since their checksums are always
calculated based on their raw content, and stored in the manifest.

manifests are also stored as blobs, but don't have a digest in the
traditional sense (they might have a signature covering parts of their
contents, but that is verified already when loading the manifest).

this commit does not cover pull/sync code which copies blobs and chunks
as-is without decoding them.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/backup/data_blob.rs
src/backup/datastore.rs
src/backup/manifest.rs
src/backup/read_chunk.rs
src/backup/verify.rs
src/client/backup_reader.rs
src/client/backup_writer.rs
src/client/remote_chunk_reader.rs
tests/blob_writer.rs