-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implementing checksum validation for single-part and multipart downloads #3641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…le-part downloads
| auto hash = handle->GetPartChecksum(partState->GetPartId()); | ||
| if (hash && partState->GetDownloadBuffer()) | ||
| { | ||
| hash->Update(partState->GetDownloadBuffer(), static_cast<size_t>(partState->GetSizeInBytes())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not do this, in the get object we already validate the checksum of the body i think the idea here is more so the compare the checksum returned from get object, combined across parts, to make sure that the combined object has the same full object checksum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright
…into download-checksums
be9c560 to
c469928
Compare
… into download-checksums
c469928 to
ee58639
Compare
Description of changes:
Implemented per-part checksum validation for downloads in TransferManager. Added validateChecksums flag (default: true) to TransferManagerConfiguration. Downloads now validate checksums for both single-part (via file read after download) and multipart transfers (per-part validation). Created GetChecksumFromResult() helper to reduce code duplication. Downloads fail immediately on checksum mismatch.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.