-
Notifications
You must be signed in to change notification settings - Fork 722
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
openssl3 integration: cleanup providers #3481
Conversation
8b24827
to
a50ee3d
Compare
|
||
return S2N_RESULT_OK; |
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, kind of silly spacing
return S2N_RESULT_OK; | |
return S2N_RESULT_OK; |
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.
I think its fine. It separates the important code from the return
bit. We do this quite often actualy:
s2n-tls/crypto/s2n_libcrypto.c
Lines 71 to 73 in bc51f39
RESULT_ENSURE(s2n_constant_time_equals((const uint8_t *) expected_version_name, (const uint8_t *) s2n_libcrypto_get_version_name(), (const uint32_t) strlen(expected_version_name)), S2N_ERR_LIBCRYPTO_VERSION_NAME_MISMATCH); | |
return S2N_RESULT_OK; |
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 don't do it for single line functions :)
Description of changes:
OSSL providers need to be cleaned up after load. This PR iterates over all providers via
OSSL_PROVIDER_do_all
and callsOSSL_PROVIDER_unload
on each. The cleanup function is called before process end ins2n_cleanup_atexit_impl
Testing:
Manual runs of OSSL3 in CI:
a50ee3dbe417b8993e90da662590a891334c6b38
How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?
Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.