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

refactor: add a s2n_libcrypto_is_openssl() helper function #4930

Merged
merged 7 commits into from
Dec 4, 2024

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Nov 23, 2024

Description of changes:

This PR adds/fixes documentation, fixes a test and introduces the helper function s2n_libcrypto_is_openssl().

This fn will be used in #4878 to gate the use of custom random to only openssl.

Callout:

We have to detect openssl by detecting the absence of other libcrypto. I have added a comment explaining why this is necessary.

Testing:

Added a new unit test.

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

@toidiu toidiu force-pushed the ak-libcrypto_openssl branch 2 times, most recently from 5dfe535 to 92f4729 Compare November 23, 2024 06:27
@toidiu toidiu force-pushed the ak-libcrypto_openssl branch from 92f4729 to f2d3a14 Compare November 23, 2024 06:29
@toidiu toidiu marked this pull request as ready for review November 23, 2024 06:31
@lrstewart lrstewart requested review from jmayclin and removed request for goatgoose November 25, 2024 23:29
crypto/s2n_fips.c Outdated Show resolved Hide resolved
crypto/s2n_libcrypto.c Outdated Show resolved Hide resolved
Comment on lines 118 to 119
* Note: This check needs to be updated if s2n-tls adds support for a new
* libcrypto.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we actually could write a test to enforce this. Like add some string matching to https://github.com/aws/s2n-tls/blob/main/tests/unit/s2n_build_test.c.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome suggestion. I added a test for supported libcrytpo 6be1cfc

tests/unit/s2n_openssl_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_build_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_build_test.c Outdated Show resolved Hide resolved
tests/unit/s2n_openssl_test.c Outdated Show resolved Hide resolved
@toidiu toidiu requested review from jmayclin and lrstewart November 27, 2024 18:08
@toidiu toidiu changed the title chore: add s2n_libcrypto_is_openssl helper, docs, fix test feat: add s2n_libcrypto_is_openssl helper, docs, fix test Dec 2, 2024
@toidiu toidiu changed the title feat: add s2n_libcrypto_is_openssl helper, docs, fix test feat: add a s2n_libcrypto_is_openssl() helper function Dec 2, 2024
@toidiu toidiu changed the title feat: add a s2n_libcrypto_is_openssl() helper function refactor: add a s2n_libcrypto_is_openssl() helper function Dec 3, 2024
@toidiu toidiu enabled auto-merge (squash) December 3, 2024 23:54
@toidiu toidiu merged commit ecf2835 into aws:main Dec 4, 2024
38 checks passed
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