That is, don't require a new negotiation with extensions.
extension_entry_st ext_mod_ext_master_secret = {
.name = "EXT MASTER SECRET",
.type = GNUTLS_EXTENSION_EXT_MASTER_SECRET,
- .parse_type = GNUTLS_EXT_MANDATORY,
+ .parse_type = GNUTLS_EXT_TLS,
.recv_func = _gnutls_ext_master_secret_recv_params,
.send_func = _gnutls_ext_master_secret_send_params,
return ret;
}
- /* Do not allow the resumption of a session which switches the
- * state of ext_master_secret */
- if (session->internals.resumed_security_parameters.ext_master_secret !=
- session->security_parameters.ext_master_secret)
- return gnutls_assert_val(GNUTLS_E_INVALID_SESSION);
+ /* Force the state of ext_master_secret based on the resumed parameters */
+ if (session->internals.resumed_security_parameters.ext_master_secret != 0)
+ session->security_parameters.ext_master_secret = 1;
return 0;
}