Conversation
17bced1 to
90c8114
Compare
|
EC can be ignored in this case, none of the failures are related to my changes |
There was a problem hiding this comment.
The _fips.go file duplication pattern (650+ lines across 4 files) is unnecessary.
This PR already correctly sets godebug fips140=auto in go.mod and GOFIPS140=v1.0.0 in Dockerfiles. That's all that's needed. When Go's native FIPS mode is active, crypto/tls automatically restricts all curve preferences, cipher suites, TLS versions, and signature algorithms to FIPS-approved values — no application code changes required.
From the official docs:
"the crypto/tls package will ignore and not negotiate any protocol version, cipher suite, signature algorithm, or key exchange mechanism that is not FIPS 140-3 approved."
The filtering is built into Go itself (crypto/tls/defaults_fips140.go). Duplicating application code to manually set CurvePreferences is redundant — Go does it for you. CockroachDB had the same manual workaround and removed it for this exact reason.
Remove: all _fips.go files, //go:build !fips/fips tags on existing files, fips-pair-check.yml, -tags fips from build commands.
Keep: go.mod changes, Dockerfile changes (GOFIPS140, CGO_ENABLED=0), CI dropgodebug steps. These are the correct, non-invasive way to enable FIPS.
|
@osmman The auto-filtering in This is the error I hit when deploying the non-fips binary with fips140=only: issue: golang/go#78178 |
|
The failures in Red Hat Konflux / trillian-cli-stack-on-pull-request seem unrelated to my changes |
Summary
Changes