-
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
Make s2n_init idempotent or return error for multi-s2n_init invocations #3446
Comments
It is NOT a good idea to make it idempotent (do nothing if already initialized). Imagine this scenario:
It would be better to go the route of returning some ALREADY_INITIALIZED error, then the Library could know that it shouldn't call s2n_cleanup() |
Another idea: Do reference counting with s2n_init() and s2n_cleanup() calls. Very similar to being idempotent (the only thing that changes on a 2nd call to s2n_init() is the reference count). |
Problem:
Customer is facing issues due to a double-call to s2n_init due to dependencies re-calling s2n_init. Directly from the customer:
Solution:
s2n_init
invocations (Allow s2n_init() to be called multiple times #1999).Requirements / Acceptance Criteria:
What must a solution address in order to solve the problem? How do we know the solution is complete?
Out of scope:
Is there anything the solution will intentionally NOT address?
The text was updated successfully, but these errors were encountered: