Skip to content

Commit

Permalink
update RSA invalid salt length error message
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Nov 25, 2024
1 parent 1db5157 commit e099dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cng/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func newPSS_PADDING_INFO(h crypto.Hash, sizeBits uint32, saltLen int, sign bool)

// A salt length of -1 and 0 are valid Go sentinel values.
if saltLen <= -2 {
return info, errors.New("crypto/rsa: PSSOptions.SaltLength cannot be negative")
return info, errors.New("crypto/rsa: invalid PSS salt length")
}
// CNG does not support salt length special cases like Go crypto does,
// so we do a best-effort to resolve them.
Expand Down

0 comments on commit e099dc9

Please sign in to comment.