feature: remove openssl-1.0.2-fips fips mode support #5030
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Release Summary:
Remove support for enabling fips mode with openssl-1.0.2-fips
Description of changes:
My previous PRs just removed openssl-1.0.2-fips builds and removed the illusion of fips-mode testing. This PR actually removes support for using fips mode + openssl-1.0.2-fips from the library. If a customer was still using openssl-1.0.2-fips, this change would break them.
Call-outs:
I could change the definition of s2n_libcrypto_is_fips to instead no longer consider openssl-1.0.2-fips as fips, but that would just silently disable fips mode. If someone out there is still using openssl-1.0.2-fips in fips mode, we should break loudly and with a clear error message.
Testing:
I found a host with a working copy of openssl-1.0.2-fips. It was old enough that it had plenty of other issues, but I got a working copy of s2n-tls built. It behaved as expected:
Old Testing
Testing this is a little tricky. I've been unsuccessful in getting a build of openssl-1.0.2-fips where I can actually enable FIPS mode (our old CI builds don't work-- one of the fun things I found while investigating our fips mode testing).
I can verify that for openssl-1.0.2-fips, things still work when FIPS mode isn't enabled:
With fips mode enabled, the best I've managed is hacky testing with awslc by defining OPENSSL_FIPS myself at the top of s2n_fips.h.
For awslc-fips (which is always in fips mode) that produces:
And for non-fips awslc (which is never in fips mode), that produces:
To test this in our CI, we'd have to either a) add back an openssl-1.0.2-fips build AND successfully enable fips mode or b) do something hacky like build our unit tests with OPENSSL_FIPS defined when building with awslc (because awslc will define the legacy functions). I'm not convinced we want to do either one of those just for an openssl-1.0.2-fips warning :/
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.