Skip to content
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

Add renegotiation callback #3527

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Add renegotiation callback #3527

merged 1 commit into from
Oct 4, 2022

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Oct 2, 2022

Description of changes:

When we receive a hello request, we need a callback to determine whether that request should be accepted or rejected. If rejected, we send a no_renegotiation alert. If accepted, the application needs to finish up sending and receiving and proceed to renegotiating (calling s2n_renegotiate_wipe and s2n_renegotiate).

We don't want the callback or its setter to be public yet, so I just put them in s2n_renegotiate.h for now.

As part of this PR, we also implement the "no secure_renegotiation" case from section 4.2 of rfc5746, so I fully commented + added exceptions for section 4.2.

Callouts

I called the callback "renegotiate_request" instead of "hello_request". I thought that was clearer about its purpose.

Testing:

Just unit tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Oct 2, 2022
@lrstewart lrstewart marked this pull request as ready for review October 2, 2022 06:24
@lrstewart lrstewart requested a review from a team as a code owner October 2, 2022 06:24
@lrstewart lrstewart merged commit 37064dc into aws:main Oct 4, 2022
@lrstewart lrstewart deleted the reneg_trigger branch October 4, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants