Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions storage/generic_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ func download(ctx context.Context, client *minio.Client, bucket, objectPath, fil
opts := minio.GetObjectOptions{}
if kmskeyId != "" {
logger.Debug("genericS3: using KMS encryption", "kmsKeyId", kmskeyId)
SSEKMS, err := encrypt.NewSSEKMS(kmskeyId, ctx)
// Updated to avoid passing in erroneous context
// https://github.com/minio/minio-go/issues/2235
SSEKMS, err := encrypt.NewSSEKMS(kmskeyId, nil)
if err != nil {
return fmt.Errorf("genericS3: download(): creating SSEKMS: %v", err)
}
Expand Down Expand Up @@ -264,7 +266,7 @@ func (s3 *GenericS3) Put(ctx context.Context, url, path string) (*Object, error)
opts := minio.PutObjectOptions{}
if s3.kmskeyId != "" {
logger.Debug("genericS3: using KMS encryption for upload", "kmsKeyId", s3.kmskeyId)
SSEKMS, err := encrypt.NewSSEKMS(s3.kmskeyId, ctx)
SSEKMS, err := encrypt.NewSSEKMS(s3.kmskeyId, nil)
if err != nil {
return nil, fmt.Errorf("genericS3: Put(): creating SSEKMS: %v", err)
}
Expand Down
Loading