TestSignerWithBrokenRand fails on Go1.20
zhsj opened this issue · comments
zhsj commented
$ go version
go version go1.20rc3 linux/amd64
$ go test -v -run TestSignerWithBrokenRand
=== RUN TestSignerWithBrokenRand
signing_test.go:175: signer should fail if rand is broken RS256 0
signing_test.go:175: signer should fail if rand is broken RS256 1
signing_test.go:175: signer should fail if rand is broken RS384 0
signing_test.go:175: signer should fail if rand is broken RS384 1
signing_test.go:175: signer should fail if rand is broken RS512 0
signing_test.go:175: signer should fail if rand is broken RS512 1
--- FAIL: TestSignerWithBrokenRand (0.02s)
FAIL
exit status 1
FAIL github.com/go-jose/go-jose/v3 0.210s
Probably related to https://tip.golang.org/doc/go1.20#math/rand
Mariano Cano commented
The problem here is that random
is deprecated in the call to rsa.PSignPKCS1v15()
since Go 1.20.
Phil Porada commented
You called that one @maraino. Nice spotting.