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

Make AWS_LC_fips_failure_callback optional in builds with AWSLC_FIPS_FAILURE_CALLBACK #2266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewhop
Copy link
Contributor

@andrewhop andrewhop commented Mar 12, 2025

Description of changes:

This makes the FIPS callback optional when AWS-LC is built with AWSLC_FIPS_FAILURE_CALLBACK which turns it on. Previously if AWS-LC was built with AWSLC_FIPS_FAILURE_CALLBACK then any application that might link with AWS-LC would need to define the callback or AWS-LC would abort. Turns out that's hard to ensure, this change goes back to the old behavior:

  • Regular FIPS build of AWS-LC doesn't require a callback and always aborts
  • FIPS build with AWSLC_FIPS_FAILURE_CALLBACK allows a callback to be defined and AWS-LC will call that and not abort
  • FIPS build with AWSLC_FIPS_FAILURE_CALLBACK and no callback AWS-LC aborts

Call-outs:

I had to remove EXPECT_TRUE(EVP_PKEY_keygen(ed_ctx.get(), &ed_key)); because that keygen call should only happen after the check for the environment variable and now we're testing both paths.

Testing:

I created a new test target that partially replicates our internal FIPS callback build.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

…FAILURE_CALLBACK. Create a new test target that partially replicates our internal FIPS callback build
@andrewhop andrewhop requested a review from a team as a code owner March 12, 2025 21:32
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.

1 participant