Open
Description
Describe the bug
With go 1.24, lestrrat-go/jwx 2.1.3 experiences two test failures:
=== RUN TestGH664
=== RUN TestGH664/Check_what_happens_when_primes_are_reduced_to_0
jwk_test.go:2119:
Error Trace: /build/golang-github-lestrrat-go-jwx-2.1.3/_build/src/github.com/lestrrat-go/jwx/jwk/jwk_test.go:2119
Error: Received unexpected error:
failed to generate signature for signer #0 (alg=RS256): failed to sign payload: modulus must be > 1
Test: TestGH664/Check_what_happens_when_primes_are_reduced_to_0
Messages: jws.Sign should succeed
=== RUN TestGH664/Check_what_happens_when_primes_are_reduced_to_1
jwk_test.go:2119:
Error Trace: /build/golang-github-lestrrat-go-jwx-2.1.3/_build/src/github.com/lestrrat-go/jwx/jwk/jwk_test.go:2119
Error: Received unexpected error:
failed to generate signature for signer #0 (alg=RS256): failed to sign payload: modulus must be > 1
Test: TestGH664/Check_what_happens_when_primes_are_reduced_to_1
Messages: jws.Sign should succeed
=== RUN TestGH664/Check_what_happens_when_primes_are_reduced_to_2
--- FAIL: TestGH664 (0.16s)
--- FAIL: TestGH664/Check_what_happens_when_primes_are_reduced_to_0 (0.00s)
--- FAIL: TestGH664/Check_what_happens_when_primes_are_reduced_to_1 (0.00s)
--- PASS: TestGH664/Check_what_happens_when_primes_are_reduced_to_2 (0.00s)
=== RUN TestGH840
jws_test.go:1620:
Error Trace: /build/golang-github-lestrrat-go-jwx-2.1.3/_build/src/github.com/lestrrat-go/jwx/jws/jws_test.go:1620
Error: Received unexpected error:
failed to serialize token at step #2: failed to generate signature for signer #0 (alg=ES256): failed to sign payload: failed to sign payload using ecdsa: P256 point not on curve
Test: TestGH840
Messages: jwt.Sign should succeed
--- FAIL: TestGH840 (0.00s)
To Reproduce / Expected behavior
Run the tests under go 1.24; they previously passed with go 1.23.
Additional context
The go 1.24 release notes mention internal changes to the crypto modules to support FIPS algorithms. The TestGH664 failure seems to be caused by this change; not sure about the TestGH840 failure.
Metadata
Assignees
Labels
No labels
Activity