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

Commit

Permalink
Merge pull request #232 from partkyle/v2
Browse files Browse the repository at this point in the history
use rsa.PSSSaltLengthEqualsHash to match rfc
  • Loading branch information
csstaub committed May 14, 2019
2 parents 42606c5 + 467354d commit 380c0b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asymmetric.go
Original file line number Diff line number Diff line change
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 380c0b0

Please sign in to comment.