From 1593cb615dbe12a8af78884562de3da51354f40e Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 13 Oct 2024 06:06:08 -0700 Subject: [PATCH] avoid unnecessary logging for KMS secret key mismatch (#20549) --- cmd/encryption-v1.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/encryption-v1.go b/cmd/encryption-v1.go index 3b93492b1..030d123eb 100644 --- a/cmd/encryption-v1.go +++ b/cmd/encryption-v1.go @@ -1099,7 +1099,9 @@ func (o *ObjectInfo) decryptPartsChecksums(h http.Header) { if _, encrypted := crypto.IsEncrypted(o.UserDefined); encrypted { decrypted, err := o.metadataDecrypter(h)("object-checksum", data) if err != nil { - encLogIf(GlobalContext, err) + if !errors.Is(err, crypto.ErrSecretKeyMismatch) { + encLogIf(GlobalContext, err) + } return } data = decrypted