Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-93280

golang net/http tests fail with "crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode" on GOLANG_FIPS=1

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.7
    • rhel-9.7
    • golang
    • None
    • golang-1.24.3-3.el9
    • No
    • Moderate
    • rhel-pt-go
    • ssg_platform_tools
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      The net/http tests from rhel-9.7 golang-1.24.3-1.el9 internal testsuite fail when using GOLANG_FIPS=1:

      [root@vm-10-0-186-254 ~]# cd /usr/lib/golang/src/net/http
      [root@vm-10-0-186-254 http]# GOLANG_FIPS=1 go test -count=1 
      --- FAIL: TestTransportBodyAltRewind (0.00s)
          transport_internal_test.go:220: EOF
          transport_internal_test.go:267: Post "https://example.org/": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode
      2025/05/22 15:06:37 http: TLS handshake error from 127.0.0.1:35752: EOF
      --- FAIL: TestNextProtoUpgrade (0.00s)
          alpn_test.go:49: Get "https://127.0.0.1:38825": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode
      --- FAIL: TestClient (0.00s)
          --- FAIL: TestClient/h2 (0.00s)
              client_test.go:75: Get "https://127.0.0.1:34639": crypto/ecdh: use of X25519 is not allowed in FIPS 140-only mode
              clientserver_test.go:282: server log: http: TLS handshake error from 127.0.0.1:46028: EOF
      (...)
      

      The failures are not reproducible when running without GOLANG_FIPS=1.

      Please provide the package NVR for which the bug is seen:

      golang-1.24.3-1.el9

      Steps to reproduce

      1.  cd /usr/lib/golang/src/net/http
      2.  GOLANG_FIPS=1 go test -count=1

              go-maint@redhat.com Go Maint
              rhn-support-emachado Edjunior Machado
              Go Maint Go Maint
              Edjunior Machado Edjunior Machado
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: