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

Enforce FIPS callback is only enabled for static builds #2241

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

andrewhop
Copy link
Contributor

Description of changes:

Due to how shared libraries and applications load it's not possible for an application to dynamically link with AWS-LC and define it's own custom callback before AWS-LC's constructor runs which expects the callback to be defined. This change requires anyone expecting to build with the callback to statically build and link AWS-LC so their callback is defined before AWS-LC's constructor runs.

This change also enables the call_back_test to run all the time, this test can run on any platform, platforms that don't support the callback will get the default (abort) behavior.

This change also disables one death test if the callback is defined. Because the callback doesn't call abort the test fails.

Testing:

Update a test dimension to enable the callback and just run the tests like normal to ensure everything passes.

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.

@andrewhop andrewhop requested a review from a team as a code owner March 5, 2025 07:07
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.05%. Comparing base (2290943) to head (7eac873).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2241   +/-   ##
=======================================
  Coverage   79.04%   79.05%           
=======================================
  Files         612      612           
  Lines      106513   106513           
  Branches    15053    15054    +1     
=======================================
+ Hits        84197    84201    +4     
+ Misses      21664    21659    -5     
- Partials      652      653    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrewhop andrewhop force-pushed the fips_callback_shared branch from 412b6ae to 3399819 Compare March 5, 2025 21:05
@andrewhop andrewhop force-pushed the fips_callback_shared branch from b51b6fb to 7eac873 Compare March 5, 2025 22:18
@andrewhop andrewhop requested a review from torben-hansen March 5, 2025 23:02
@andrewhop andrewhop enabled auto-merge (squash) March 5, 2025 23:23
@andrewhop andrewhop merged commit 95b1fad into aws:main Mar 5, 2025
111 of 114 checks passed
justsmth pushed a commit that referenced this pull request Mar 6, 2025
### Description of changes: 

https://github.com/aws/aws-lc/releases/edit/untagged-aef9ee5aee62c3242f30

## What's Changed
* Remove BORINGSSL_FIPS_BREAK_FFC_DH by @andrewhop in
#2216
* Increase required CMake version to 3.5 by @andrewhop in
#2219
* Coverity Fix by @smittals2 in #2236
* Check pagesize is non-negative in AES-XTS test by @nebeid in
#2237
* Don't 'dllexport' Windows symbols on static build by @justsmth in
#2238
* Update to using Clang 18 on Windows by @justsmth in
#2240
* Enforce FIPS callback is only enabled for static builds by @andrewhop
in #2241


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

4 participants