Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions nx_secure/src/nx_secure_tls_1_3_server_handshake.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,20 +559,15 @@ NX_SECURE_TLS_SERVER_STATE old_server_state;

/* Post-Auth server messages (if any) are sent here. */

/* For session resumption, send a NewSessionTicket message to allow for resumption PSK to be generated. */
status = _nx_secure_tls_allocate_handshake_packet(tls_session, packet_pool, &send_packet, wait_option);
if (status != NX_SUCCESS)
{
break;
}

/* Populate the packet with our NewSessionTicket Message. */
status = _nx_secure_tls_send_newsessionticket(tls_session, send_packet);
status = _nx_secure_tls_send_handshake_record(tls_session, send_packet, NX_SECURE_TLS_NEW_SESSION_TICKET, wait_option);
if(status != NX_SUCCESS)
{
break;
}
/* Do NOT send a NewSessionTicket. The PSK extension handler in
* _nx_secure_tls_process_clienthello_psk_extension explicitly
* rejects any age != 0 (i.e. every real resumption attempt) with
* NX_SECURE_TLS_BAD_CLIENTHELLO_PSK_EXTENSION — the server only
* supports external PSKs, not resumption. Sending a ticket
* anyway tells the client we DO resume; clients that act on
* that (e.g. Java JSSE) replay the ticket on the next handshake
* and the server then aborts with an Alert(internal_error),
* breaking every other connection from those clients. */

/* If we get here, the Client Finished was processed without errors and the handshake is complete. */
tls_session -> nx_secure_tls_server_state = NX_SECURE_TLS_SERVER_STATE_HANDSHAKE_FINISHED;
Expand Down
Loading