openssl: when creating a new context, there cannot be an old one#7585
Closed
openssl: when creating a new context, there cannot be an old one#7585
Conversation
Remove the previous handling would call SSL_CTX_free() and instead add an assert that will halt a debug build if there ever is a context already set at this point.
Member
|
The check was initiated in 1946058 from 2006 and I would guess no longer relevant. The CTX is freed when the connection is closed (conn_shutdown). A cursory look shows the ossl connection steps are only initiated from MSTATE_PROTOCONNECT when protocol_connect is called, and then when the steps are done (ie ssl connection phase complete) the ossl connect state machine is reset to ssl_connect_1. Could there ever be a time now when the connection is not closed and step 1 is repeated? |
Member
Author
No, that would be seriously wrong and that's why I put the assert there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove the previous handling would call SSL_CTX_free() and instead add
an assert that will halt a debug build if there ever is a context
already set at this point.