s2n_prf_key_expansion was being called multiple times incase of session resumption and was causing memory leaks, removing the key expansion call from cipher change spec functions
@@ -47,10 +47,6 @@ int s2n_server_ccs_recv(struct s2n_connection *conn)
/* Flush any partial alert messages that were pending */
GUARD(s2n_stuffer_wipe(&conn->alert_in));
- if (IS_RESUMPTION_HANDSHAKE(conn->handshake.handshake_type)) {
- GUARD(s2n_prf_key_expansion(conn));
- }
-
return 0;
}
@@ -58,9 +54,5 @@ int s2n_server_ccs_send(struct s2n_connection *conn)
{
GUARD(s2n_stuffer_write_uint8(&conn->handshake.io, CHANGE_CIPHER_SPEC_TYPE));
- if (IS_RESUMPTION_HANDSHAKE(conn->handshake.handshake_type)) {
- GUARD(s2n_prf_key_expansion(conn));
- }
-
return 0;
}
