Skip to content

Commit

Permalink
Merge pull request #74 from microsoft/dev/qmuntal/rsapsss
Browse files Browse the repository at this point in the history
Update RSA invalid salt length error message
  • Loading branch information
karianna authored Nov 25, 2024
2 parents 1db5157 + e099dc9 commit 43fb511
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 43fb511

Please sign in to comment.