Skip to content

Bring back FIPSCapable#10

Merged
qmuntal merged 6 commits into
mainfrom
dev/qmuntal/fipsc
May 25, 2026
Merged

Bring back FIPSCapable#10
qmuntal merged 6 commits into
mainfrom
dev/qmuntal/fipsc

Conversation

@qmuntal
Copy link
Copy Markdown
Member

@qmuntal qmuntal commented May 21, 2026

FIPS and FIPSCapable are both used in the Go toolchain for good reasons. I recently consolidated them, and that was a mistake,.

@qmuntal qmuntal requested a review from a team as a code owner May 21, 2026 14:11
Copilot AI review requested due to automatic review settings May 21, 2026 14:11
@qmuntal qmuntal enabled auto-merge May 21, 2026 14:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reintroduces a distinct FIPSCapable check in osslsetup, separating “FIPS mode is enabled” from “the default provider is FIPS-capable”, and updates tests/output to reflect both signals (aligning with how the Go toolchain uses these concepts).

Changes:

  • Refines FIPS() semantics for OpenSSL 3+/4 to require both “FIPS enabled in default properties” and proof that a FIPS-matching provider can supply SHA-256.
  • Adds FIPSCapable() to detect whether the default provider effectively satisfies a FIPS property query even when FIPS mode isn’t explicitly enabled.
  • Updates openssl_test.go to print both values and adds a new TestFIPSCapable.
Show a summary per file
File Description
osslsetup/fips.go Reworks FIPS detection and adds FIPSCapable heuristics for OpenSSL 3+/4.
openssl/openssl_test.go Updates test output and adds coverage for FIPSCapable.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 5

Comment thread osslsetup/fips.go Outdated
Comment thread osslsetup/fips.go
Comment thread osslsetup/fips.go
Comment thread osslsetup/fips.go
Comment thread openssl/openssl_test.go
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Benchmark Results

No significant regressions detected

ubuntu-22.04-go1.25-cgo1-ossl3.0.13 · results
ubuntu-22.04-go1.25-cgo1-ossl3.1.5 · results
ubuntu-22.04-go1.25-cgo1-ossl3.2.1 · results
ubuntu-22.04-go1.25-cgo1-ossl3.3.1 · results
ubuntu-22.04-go1.25-cgo1-ossl3.4.0 · results
ubuntu-22.04-go1.25-cgo1-ossl3.5.0 · results
ubuntu-22.04-go1.26-cgo1-ossl3.0.13 · results
ubuntu-22.04-go1.26-cgo1-ossl3.1.5 · results
ubuntu-22.04-go1.26-cgo1-ossl3.2.1 · results
ubuntu-22.04-go1.26-cgo1-ossl3.3.1 · results
ubuntu-22.04-go1.26-cgo1-ossl3.4.0 · results
ubuntu-22.04-go1.26-cgo1-ossl3.5.0 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.0.13 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.1.5 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.2.1 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.3.1 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.4.0 · results
ubuntu-24.04-arm-go1.25-cgo1-ossl3.5.0 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.0.13 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.1.5 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.2.1 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.3.1 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.4.0 · results
ubuntu-24.04-arm-go1.26-cgo1-ossl3.5.0 · results
ubuntu-latest-go1.25-cgo1-azl3 · results
ubuntu-latest-go1.26-cgo1-azl3 · results

@qmuntal qmuntal merged commit 23afd07 into main May 25, 2026
141 of 143 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/fipsc branch May 25, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants