All Products
Search
Document Center

Object Storage Service:0005-00000416

Last Updated:Mar 20, 2026

Problem description

The value of x-oss-meta-client-side-encryption-magic-number-hmac in the UploadPart request does not match the value set in the InitiateMultipartUpload request.

Causes

This error occurs when x-oss-meta-client-side-encryption-wrap-alg is set to rsa. In that case, OSS requires x-oss-meta-client-side-encryption-magic-number-hmac to be present and its value must match the value set in the InitiateMultipartUpload request.

Examples

The following example shows a mismatched HMAC header that causes the error.

InitiateMultipartUpload request — sets the HMAC value to value1:

POST /multipart.data?uploads HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 22 Feb 2012 08:32:21 GMT
x-oss-storage-class: Archive
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-magic-number-hmac: value1

UploadPart request — sets the HMAC value to value2 (mismatch):

PUT /multipart.data?partNumber=1&uploadId=0004B9895DBBB6EC9****  HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 6291456
Date: Wed, 22 Feb 2012 08:32:21 GMT
Authorization: OSS qn6q**************:77Dv****************
x-oss-meta-client-side-encryption-wrap-alg: rsa
x-oss-meta-client-side-encryption-magic-number-hmac: value2

Because value1 != value2, OSS rejects the UploadPart request.

Solutions

Set x-oss-meta-client-side-encryption-magic-number-hmac to the same value in the InitiateMultipartUpload request and the UploadPart request.

References