1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

keyservices: address logging regression

Replace the logging of failed encryption and decryption attempts from
error to info level.

This to address a regression in which an encryption or decryption
attempt with a series of keys would result in a list of failed attempts
logged to stderr even when the operation itself eventually succeeded.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
Hidde Beydals
2023-09-12 23:55:49 +02:00
parent cb678769b0
commit 6ec0312ffe
6 changed files with 34 additions and 34 deletions

View File

@@ -257,7 +257,7 @@ func (key *MasterKey) Encrypt(dataKey []byte) error {
}
errs = append(errs, fmt.Errorf("GnuPG binary error: %w", binaryErr))
log.WithField("fingerprint", key.Fingerprint).Error("Encryption failed")
log.WithField("fingerprint", key.Fingerprint).Info("Encryption failed")
return fmt.Errorf("could not encrypt data key with PGP key: %w", errs)
}
@@ -368,7 +368,7 @@ func (key *MasterKey) Decrypt() ([]byte, error) {
}
errs = append(errs, fmt.Errorf("GnuPG binary error: %w", binaryErr))
log.WithField("fingerprint", key.Fingerprint).Error("Decryption failed")
log.WithField("fingerprint", key.Fingerprint).Info("Decryption failed")
return nil, fmt.Errorf("could not decrypt data key with PGP key: %w", errs)
}