[#595] Simplify encryption.Params struct

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-08-12 09:56:38 +03:00 committed by Kirillov Denis
parent 94a6a55919
commit 7ab473a688
3 changed files with 14 additions and 11 deletions

View file

@ -334,7 +334,12 @@ func (h handler) formEncryptionParams(header http.Header) (enc encryption.Params
return enc, errors.GetAPIError(errors.ErrSSECustomerKeyMD5Mismatch)
}
return encryption.NewParams(key)
params, err := encryption.NewParams(key)
if err == nil {
enc = *params
}
return enc, err
}
func (h *handler) PostObject(w http.ResponseWriter, r *http.Request) {