mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
Encrypt checksums with KMS on CompleteMultipartUpload (#16177)
This commit is contained in:
@@ -374,5 +374,16 @@ func completeMultipartOpts(ctx context.Context, r *http.Request, bucket, object
|
||||
}
|
||||
opts.MTime = mtime
|
||||
opts.UserDefined = make(map[string]string)
|
||||
|
||||
// Transfer SSEC key in opts.EncryptFn
|
||||
if crypto.SSEC.IsRequested(r.Header) {
|
||||
key, err := ParseSSECustomerRequest(r)
|
||||
if err == nil {
|
||||
// Set EncryptFn to return SSEC key
|
||||
opts.EncryptFn = func(baseKey string, data []byte) []byte {
|
||||
return key
|
||||
}
|
||||
}
|
||||
}
|
||||
return opts, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user