-
Notifications
You must be signed in to change notification settings - Fork 727
refactor: remove conn->client_hello_version #5278
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
Merged
Merged
Conversation
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
cdf8018
to
88b2b00
Compare
maddeleine
reviewed
Apr 30, 2025
goatgoose
approved these changes
May 1, 2025
Co-authored-by: Sam Clark <[email protected]>
maddeleine
reviewed
May 2, 2025
maddeleine
approved these changes
May 7, 2025
maddeleine
approved these changes
May 7, 2025
dougch
pushed a commit
to dougch/s2n-tls
that referenced
this pull request
May 9, 2025
Co-authored-by: Sam Clark <[email protected]>
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.
Release Summary:
Description of changes:
While poking around at the SSLv2 logic, I was very frustrated by our protocol version handling.
We have several closely related fields:
conn->client_hello.sslv2
: indicates whether the ClientHello was an SSLv2 ClientHello message instead of the standard TLS record + TLS ClientHello handshake message.conn->client_hello.legacy_version
: represents the legacy version as written in the ClientHello.conn->client_hello_version
: If client_hello.sslv2, then always "S2N_SSLv2", even though client_hello.legacy_version != S2N_SSLv2. If not client_hello.sslv2, then MIN(client_hello.legacy_version, S2N_TLS12). So it's both a duplicate, and a very confusing duplicate.When we use
conn->client_hello_version
, we generally actually wantconn->client_hello.sslv2
,conn->client_hello.legacy_version
, or evenconn->client_protocol_version
. I went through and replaced client_hello_version with the more accurate values.Testing:
Existing tests pass, including the sslv2 integration test.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.