-
Notifications
You must be signed in to change notification settings - Fork 707
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
fix: Initial config influences client hello parsing #4676
Merged
Merged
Conversation
This file contains 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
maddeleine
changed the title
Initial config
fix: Initial config influences client hello parsing
Jul 30, 2024
lrstewart
reviewed
Aug 5, 2024
maddeleine
force-pushed
the
initial_config
branch
from
August 13, 2024 16:23
e2e78b4
to
7459bf0
Compare
maddeleine
requested review from
lrstewart and
goatgoose
and removed request for
jmayclin
August 13, 2024 16:50
goatgoose
reviewed
Aug 13, 2024
lrstewart
reviewed
Aug 13, 2024
goatgoose
approved these changes
Aug 14, 2024
lrstewart
approved these changes
Aug 14, 2024
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.
Resolved issues:
Partially tackles #4585
Description of changes:
This PR strengthens our assertion that servers don't use the config before the client hello callback is invoked (allowing the user to swap out the config based on information in the client hello.)
I added a test that we aren't dereferencing anything on the config before the client hello cb is invoked. The way I do this is by setting the connection's config pointer to null. Any attempt to dereference pointers on that config will error/segfault.
I fixed a couple places where we do reference the config before the callback is invoked. One of those is setting a default ecc curve if the client doesn't send any ecc preferences in the extensions. I moved that chunk of code from the "parsing" function to the "processing" function.
Call-outs:
I'm not fixing everything in #4585. Our sslv2 client hello processing code uses the config before the client hello callback is invoked. I don't want to refactor our sslv2 client hello code right now, as we don't yet have an integration test for that behavior. Once this is done, we should have more assurance that a refactor is safe.
Testing:
Adds tests.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.