Skip to content

Commit

Permalink
gpg: Remove incorrect %w from error string
Browse files Browse the repository at this point in the history
The call we are reporting an error does not return an `error` value, the
`err` variable was set by the goOpenpgp.ReadArmoredKeyRing call.
 We should not include ("%w", err) in the error we return after a
goClearSign.Decode() failure as 'err' is nil anyway if we reach this
call.
  • Loading branch information
cfergeau authored and praveenkumar committed Sep 13, 2023
1 parent 10a36ba commit 45831b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crc/gpg/gpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func GetVerifiedClearsignedMsgV3(pubkey, clearSignedMsg string) (string, error)
}
block, rest := goClearsign.Decode([]byte(clearSignedMsg))
if len(rest) != 0 {
return "", fmt.Errorf("Error decoding clear signed message: %w", err)
return "", fmt.Errorf("Error decoding clear signed message")
}
sig, err := io.ReadAll(block.ArmoredSignature.Body)
if err != nil {
Expand Down

0 comments on commit 45831b0

Please sign in to comment.