Skip to content

Commit 51c21c6

Browse files
committed
Fix #14: add comment for RSA-PSS nil opts (backward compat)
Made-with: Cursor
1 parent 8ad60bc commit 51c21c6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

crypto.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ func (v Verifier) verify(buff []byte, sig []byte) (bool, error) {
453453
case "rsa-pss-sha512":
454454
hashed := sha512.Sum512(buff)
455455
key := v.key.(rsa.PublicKey)
456+
// nil opts: accept any valid salt length for backward compatibility with pre-RFC-9421 signers
456457
err := rsa.VerifyPSS(&key, crypto.SHA512, hashed[:], sig, nil)
457458
if err != nil {
458459
// Return opaque error; underlying crypto err discarded to avoid leaking internals

0 commit comments

Comments
 (0)