-
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
Handshake changes necessary to negotiate NPN #3558
Conversation
2f92656
to
e512ae9
Compare
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.
From offline discussion: it's pretty hard to reason about these changes, because the actions of these messages are now very dependent on message ordering. Which isn't great.
I think we might be able to make this easier to follow with some abstraction. Like, a "start encryption" method that, if the crypto parameters aren't set to conn->secure yet, zeroes the sequence number and sets the crypto parameters to conn->secure. Both npn and the ccs message would call the new method, but wouldn't have to be aware of each other.
7d45d2a
to
5ff34bd
Compare
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.
Just a few nits now. It's sad that pre-renegotiation you'd be saving us a few bytes, because we wouldn't need to store the verify_data anymore :(
9cc7ce6
to
80e18ed
Compare
Resolved issues:
Related to #3516
Description of changes:
This pulls some code out of the monster PR: #3545. Essentially I am pulling out the important handshake message changes that need to occur to negotiate NPN. These are:
None of these changes should affect the regular non-NPN handshake.
Call-outs:
I am trying to keep the changes in this PR in sync with #3545 so you can see that these changes let us pass the s2n_self_talk_npn_test. Otherwise I can't really prove that these changes are necessary to successfully negotiate NPN.
Testing:
unit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.