Skip to content

Commit 59ae336

Browse files
authored
update RSA invalid salt length error message (#225)
1 parent 0657d68 commit 59ae336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rsa.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func saltLength(saltLen int, sign bool) (C.int, error) {
238238
// A salt length of -2 is valid in OpenSSL, but not in crypto/rsa, so reject
239239
// it, and lengths < -2, before we convert to the OpenSSL sentinel values.
240240
if saltLen <= -2 {
241-
return 0, errors.New("crypto/rsa: PSSOptions.SaltLength cannot be negative")
241+
return 0, errors.New("crypto/rsa: invalid PSS salt length")
242242
}
243243
// OpenSSL uses sentinel salt length values like Go crypto does,
244244
// but the values don't fully match for rsa.PSSSaltLengthAuto (0).

0 commit comments

Comments
 (0)