Add Type-Code context to EAP-TLS 1.3 exported Key_Material and Method-Id
Change to require the Type-Code in context for Key_Material and Method-Id has now been published as draft-ietf-emu-eap-tls13-04. https://tools.ietf.org/html/draft-ietf-emu-eap-tls13-04#section-2.3 Signed-off-by: Ervin Oro <ervin.oro@aalto.fi>
This commit is contained in:
parent
90270e15cb
commit
7ad9e36d4a
4 changed files with 30 additions and 11 deletions
|
@ -413,17 +413,18 @@ u8 * eap_peer_tls_derive_session_id(struct eap_sm *sm,
|
|||
|
||||
if (eap_type == EAP_TYPE_TLS && data->tls_v13) {
|
||||
u8 *id, *method_id;
|
||||
const u8 context[] = { EAP_TYPE_TLS };
|
||||
|
||||
/* Session-Id = <EAP-Type> || Method-Id
|
||||
* Method-Id = TLS-Exporter("EXPORTER_EAP_TLS_Method-Id",
|
||||
* "", 64)
|
||||
* Type-Code, 64)
|
||||
*/
|
||||
*len = 1 + 64;
|
||||
id = os_malloc(*len);
|
||||
if (!id)
|
||||
return NULL;
|
||||
method_id = eap_peer_tls_derive_key(
|
||||
sm, data, "EXPORTER_EAP_TLS_Method-Id", NULL, 0, 64);
|
||||
sm, data, "EXPORTER_EAP_TLS_Method-Id", context, 1, 64);
|
||||
if (!method_id) {
|
||||
os_free(id);
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue