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.
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
Prohibit TLS 1.3 middlebox compatibility mode #3595
Prohibit TLS 1.3 middlebox compatibility mode #3595
Changes from 1 commit
d4baa8a
cf939cc
3a633d8
6a4c95e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of MUST NOT for client is fine, but I would prefer using SHOULD or MAY on the server-side.
In a server-side TLS 1.3 stack, it is entirely reasonable to implement Compatibility Mode at the record layer in a reactive manner. In your record layer, when you receive the handshake traffic secret from the handshake layer, you inject CCS depending on the length of SH.legacy_session_id that has been retained. At the moment, there's nothing that has to be done at the handshake layer on the server-side.
Use of MUST NOT for the server breaks TLS stacks implemented that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume that you're not validating the empty
legacy_session_id
on the server side, how would you prevent the injection of CCS then?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do SHOULD.
The way our stack works is that we let TLS consume the ClientHello and then ask it for a response. That produces a CCS if the client asked for one. We turn that into an error (we used to crash). Any implementation could, as I think Kazuho suggests, just drop the CCS, which might be easier in cases where your interface only passes handshake records. We have a generic record callback, so detecting record type 20 is easy.