Add comment about PSSOptions to jws.go.
This commit is contained in:
parent
c7c5617b6c
commit
6e48708a74
|
|
@ -190,6 +190,8 @@ func Sign(alg JoseAlgorithm, privateKey interface{}, payload []byte) (JsonWebSig
|
|||
if rsaPriv == nil {
|
||||
return zero, errors.New(fmt.Sprintf("Algorithm %s requres RSA private key", jws.Header.Algorithm))
|
||||
}
|
||||
// Contrary to docs, you can't pass a nil instead of the PSSOptions; You'll
|
||||
// get a nil dereference.
|
||||
sig, err = rsa.SignPSS(rand.Reader, rsaPriv, hashID, inputHash, &rsa.PSSOptions{})
|
||||
case "E":
|
||||
if ecPriv == nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue