Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
use rsa.PSSSaltLengthEqualsHash to match rfc: https://mailarchive.iet…
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Partridge committed May 13, 2019
1 parent 42606c5 commit 467354d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asymmetric.go
Expand Up @@ -29,7 +29,7 @@ import (
"math/big"

"golang.org/x/crypto/ed25519"
"gopkg.in/square/go-jose.v2/cipher"
josecipher "gopkg.in/square/go-jose.v2/cipher"
"gopkg.in/square/go-jose.v2/json"
)

Expand Down Expand Up @@ -288,7 +288,7 @@ func (ctx rsaDecrypterSigner) signPayload(payload []byte, alg SignatureAlgorithm
out, err = rsa.SignPKCS1v15(RandReader, ctx.privateKey, hash, hashed)
case PS256, PS384, PS512:
out, err = rsa.SignPSS(RandReader, ctx.privateKey, hash, hashed, &rsa.PSSOptions{
SaltLength: rsa.PSSSaltLengthAuto,
SaltLength: rsa.PSSSaltLengthEqualsHash,
})
}

Expand Down

0 comments on commit 467354d

Please sign in to comment.