Skip to content

Commit

Permalink
move compliance comment to where handshake is aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
goatgoose committed Jul 6, 2022
1 parent 386e42e commit 9373fc8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tls/s2n_server_hello_retry.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ int s2n_server_hello_retry_recv(struct s2n_connection *conn)
*# and (2) the selected_group field does not
*# correspond to a group which was provided in the "key_share" extension
*# in the original ClientHello.
*
*= https://tools.ietf.org/rfc/rfc8446#section-4.1.4
*# Clients MUST abort the handshake with an
*# "illegal_parameter" alert if the HelloRetryRequest would not result
*# in any change in the ClientHello.
**/
bool new_key_share_requested = false;
if (named_curve != NULL) {
Expand All @@ -116,6 +111,11 @@ int s2n_server_hello_retry_recv(struct s2n_connection *conn)
*# If either of these checks fails, then
*# the client MUST abort the handshake with an "illegal_parameter"
*# alert.
*
*= https://tools.ietf.org/rfc/rfc8446#section-4.1.4
*# Clients MUST abort the handshake with an
*# "illegal_parameter" alert if the HelloRetryRequest would not result
*# in any change in the ClientHello.
**/
POSIX_ENSURE(new_key_share_requested, S2N_ERR_INVALID_HELLO_RETRY);
POSIX_ENSURE(selected_group_in_supported_groups, S2N_ERR_INVALID_HELLO_RETRY);
Expand Down

0 comments on commit 9373fc8

Please sign in to comment.