-
Notifications
You must be signed in to change notification settings - Fork 712
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
feat: feature probe S2N_LIBCRYPTO_SUPPORTS_ENGINE #4878
Conversation
Questions:
|
b329d11
to
f051bbf
Compare
tests/unit/s2n_random_test.c
Outdated
bool s2n_libcrypto_is_fips(void); | ||
bool s2n_libcrypto_is_openssl(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: looks a bit wonky to specify void for one no-arg method but not for the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually need void
for compatibility with older compilers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool s2n_libcrypto_is_fips(void); | |
bool s2n_libcrypto_is_openssl(); | |
bool s2n_libcrypto_is_fips(void); | |
bool s2n_libcrypto_is_openssl(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this and opened an issue for others in our codebase #4952
Co-authored-by: Cameron Bytheway <[email protected]>
Description of changes:
Some platform are removing the
openssl/engine.h
header, which causes s2n-tls builds to fail (#4705, #4873).This PR splits the static
S2N_LIBCRYPTO_SUPPORTS_CUSTOM_RAND
check into a:Additional benefits:
The split limits the scope of the conditional compilation to ENGINE related features. The feature probe is also more comprehensive and flexible than the static check (eg. check for the openssl/engine.h header).
Existing checks (
S2N_LIBCRYPTO_SUPPORTS_CUSTOM_RAND
):New checks:
ENGINE
related APIs are defined: (feature probe)RAND_METHOD
signature: (feature probe. due to awslc signature differences)Testing:
I added a negative test for the feature probe. The positive test is missing due to unrelated feature probe failure on AL2. There is an issue for AL2 and I verified that only AL2 was failing by testing this commit in isolation. GeneralBatch Fail vs Pass after the test was removed.
Manual testing
I build s2n-tls linked to an openssl configured and build with the
no-engine
option.Local build instructions **(Click to Expand)**
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.