From e099dc9b5435abcf50173a1e6f1a2d74c23d5449 Mon Sep 17 00:00:00 2001 From: qmuntal Date: Mon, 25 Nov 2024 09:43:56 +0100 Subject: [PATCH] update RSA invalid salt length error message --- cng/rsa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cng/rsa.go b/cng/rsa.go index e9e2a09..6198c75 100644 --- a/cng/rsa.go +++ b/cng/rsa.go @@ -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.