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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user