aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/s2n/tls/s2n_handshake_io.c
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-02-23 09:38:13 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-02-23 09:38:13 +0300
commit2c97e0c9e48d56f449a3abea7594e3655636c39d (patch)
tree1c2d1e71260ab25e03d403255d5f42cb5ac82675 /contrib/restricted/aws/s2n/tls/s2n_handshake_io.c
parent6842a88830f54c638160425e8c36af2c057bcf70 (diff)
downloadydb-2c97e0c9e48d56f449a3abea7594e3655636c39d.tar.gz
Update contrib/restricted/aws/s2n to 1.3.36
Diffstat (limited to 'contrib/restricted/aws/s2n/tls/s2n_handshake_io.c')
-rw-r--r--contrib/restricted/aws/s2n/tls/s2n_handshake_io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/restricted/aws/s2n/tls/s2n_handshake_io.c b/contrib/restricted/aws/s2n/tls/s2n_handshake_io.c
index 87aa6efb88..efc92eb625 100644
--- a/contrib/restricted/aws/s2n/tls/s2n_handshake_io.c
+++ b/contrib/restricted/aws/s2n/tls/s2n_handshake_io.c
@@ -1046,12 +1046,16 @@ int s2n_conn_set_handshake_type(struct s2n_connection *conn)
if (conn->config->use_tickets) {
if (conn->session_ticket_status == S2N_DECRYPT_TICKET) {
+ /* We reuse the session if a valid TLS12 ticket is provided.
+ * Otherwise, we will perform a full handshake and then generate
+ * a new session ticket. */
if (s2n_decrypt_session_ticket(conn, &conn->client_ticket_to_decrypt) == S2N_SUCCESS) {
return S2N_SUCCESS;
}
POSIX_GUARD_RESULT(s2n_validate_ems_status(conn));
+ /* Set up the handshake to send a session ticket since a valid ticket was not provided */
if (s2n_config_is_encrypt_decrypt_key_available(conn->config) == 1) {
conn->session_ticket_status = S2N_NEW_TICKET;
POSIX_GUARD_RESULT(s2n_handshake_type_set_tls12_flag(conn, WITH_SESSION_TICKET));