Skip to content

Conversation

@toidiu
Copy link
Contributor

@toidiu toidiu commented Mar 23, 2022

Description of changes:

Currently s2n-quic emits the on_server_name_information event after it receives and installs the 1-rtt keys (and does a bunch of validation). This means that its possible to abort the handshake if any of the validation fails and not emit the server_name event.

This makes it difficult for servers to debug which clients(server_name) is experiencing failures.

This PR moves the on_server_name_information event to right after the server_name is parsed which solves the issue above.

Similarly this PR also emits the application_protocol and the associated event earlier.

Callout:

  • We could also do something similar for ALPN (TODO: validate if we should do this)

Testing:

Existing test which complete the handshake should still pass. There is an inline assert which confirms that on_server_name happens prior to 1-rtt keys.

Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed? -->

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

@toidiu toidiu requested a review from maddeleine March 23, 2022 21:53
@toidiu toidiu marked this pull request as ready for review March 23, 2022 22:01
@toidiu toidiu requested a review from camshaft March 23, 2022 22:01
@toidiu toidiu changed the title Ak server name feat(s2n-quic-tls, s2n-quic-rustls): emit server_name and application_protocol events sooner in the handshake Mar 23, 2022
Copy link
Contributor

@camshaft camshaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really close!

@toidiu toidiu requested a review from camshaft March 24, 2022 21:43
@toidiu toidiu enabled auto-merge (squash) March 24, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants