Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FIPSCapable #245

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Implement FIPSCapable #245

merged 4 commits into from
Jan 15, 2025

Conversation

qmuntal
Copy link
Collaborator

@qmuntal qmuntal commented Jan 10, 2025

When using OpenSSL 3, openssl.FIPS prove that FIPS mode is enabled by checking that the default properties contain fips=yes and that SHA-256 can be fetched with the default properties. This behavior is useful to know if there is an explicit intent to only run in FIPS mode.

On the other hand, openssl.FIPS doesn't cover the use case of wanting to know whether the provider configured by default is FIPS-capable regardless if the default properties. In fact, most times users don't care about the default properties, they just want to ensure they are running in FIPS mode, aka the default provider is FIPS capable.

This PR adds the openssl.FIPSCapable function to cover this new use case.

For microsoft/go#1445.

Copy link
Contributor

@Copilot 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.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

openssl_test.go:146

  • The error message 'HasFIPSProvider mismatch' is unclear. It should be updated to 'FIPSCapable mismatch' to better describe the test.
t.Fatalf("HasFIPSProvider mismatch: want %v, got %v", want, got)

Tip: Turn on automatic Copilot reviews for this repository to get quick feedback on every pull request. Learn more

openssl.go Outdated Show resolved Hide resolved
@qmuntal qmuntal requested a review from Copilot January 10, 2025 09:51

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

openssl.go Show resolved Hide resolved
@qmuntal qmuntal requested review from Copilot and dagood January 14, 2025 08:07

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

openssl.go Show resolved Hide resolved
@qmuntal qmuntal merged commit bf655f6 into v2 Jan 15, 2025
54 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/fipsprov branch January 15, 2025 10:38
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