|
|
|
@ -552,6 +552,11 @@ func (api objectAPIHandlers) HeadObjectHandler(w http.ResponseWriter, r *http.Re |
|
|
|
|
case crypto.S3.IsEncrypted(objInfo.UserDefined): |
|
|
|
|
w.Header().Set(crypto.SSEHeader, crypto.SSEAlgorithmAES256) |
|
|
|
|
case crypto.SSEC.IsEncrypted(objInfo.UserDefined): |
|
|
|
|
// Validate the SSE-C Key set in the header.
|
|
|
|
|
if _, err = crypto.SSEC.UnsealObjectKey(r.Header, objInfo.UserDefined, bucket, object); err != nil { |
|
|
|
|
writeErrorResponseHeadersOnly(w, toAPIErrorCode(err)) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
w.Header().Set(crypto.SSECAlgorithm, r.Header.Get(crypto.SSECAlgorithm)) |
|
|
|
|
w.Header().Set(crypto.SSECKeyMD5, r.Header.Get(crypto.SSECKeyMD5)) |
|
|
|
|
} |
|
|
|
|