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 0657d68 commit 39dc9a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func saltLength(saltLen int, sign bool) (C.int, error) {
// A salt length of -2 is valid in OpenSSL, but not in crypto/rsa, so reject
// it, and lengths < -2, before we convert to the OpenSSL sentinel values.
if saltLen <= -2 {
return 0, errors.New("crypto/rsa: PSSOptions.SaltLength cannot be negative")
return 0, errors.New("crypto/rsa: invalid PSS salt length")
}
// OpenSSL uses sentinel salt length values like Go crypto does,
// but the values don't fully match for rsa.PSSSaltLengthAuto (0).
Expand Down

0 comments on commit 39dc9a2

Please sign in to comment.