Could there be multiple checksums added (CRC32, CRC32C, SHA1, SHA256 ) all at once, and all of these will be verified?
putObjectRequest.ChecksumSHA256 = "...";
putObjectRequest.ChecksumCRC32 = "...";
putObjectRequest.ChecksumCRC32C = "...";
putObjectRequest.ChecksumSHA1 = "...";
Here I seem can assign only 1 per request
request.ChecksumAlgorithm = ChecksumAlgorithm.SHA256;
Thanks
No, you can't use and/or check multiple additional checksum values.
You can use
Content-MD5
alongside one of these additional checksum algorithms e.g.Content-MD5
+x-amz-checksum-crc32
is fine butContent-MD5
+x-amz-checksum-crc32
+x-amz-checksum-sha1
isn't.It's also not a limit of 2 i.e. if you don't send the
Content-MD5
header, you can still only use one of the above additional checksums.If you try to use more than once e.g. multiple checksums (CRC32, CRC32C, SHA1 and/or SHA256) all at once, the SDKs will throw an error that'll look like this:
The .NET SDK specifically will throw an
Amazon.S3.AmazonS3Exception
with error code ofInvalidRequest
with the above message.The error message is returned by the underlying S3 API.