Tolerate s2n_init() being called before aws_io_library_init() #508
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.
ISSUE:
A customer reported a failure when aws-c-io called
s2n_init()
. The customer's code was already using S2N-TLS, and they were already callings2n_init()
themselves. They were pulling in aws-c-io via a deep dependency chain and weren't even aware that anything else in their application was using S2N-TLS.In the past, the failing call to
s2n_init()
wasn't being checked, we did start checking for success in this PR #461DESCRIPTION OF CHANGES
If S2N-TLS has already been initialized, then aws-c-io does not call
s2n_init()
ors2n_cleanup()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.