There should be no circumstance that leads to a session being resumed
without having a valid session resumption secret that was stored by a
successfully established previous connection.
As an additional layer of defence in depth, poison the initial session
resumption master secret so that a predictable all-zero secret can
never be used accidentally in future.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
INIT_LIST_HEAD ( &session->conn );
list_add ( &session->list, &tls_sessions );
+ /* Poison resumption master secret */
+ tls_ephemeral_label ( tls, "res poison",
+ session->resumption_master_secret,
+ sizeof ( session->resumption_master_secret ) );
+
/* Record session */
tls->session = session;