forked from espressif/esp-idf
EAP-TLS: Update Session-Id derivation with TLS v1.3
Move to the version used in draft-ietf-emu-eap-tls13-03.txt, i.e., include the 0x0D prefix and use a different TLS-Exporter() label string. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
committed by
Sarvesh Bodakhe
parent
ed8452d53f
commit
bb16734aa9
@@ -304,10 +304,26 @@ u8 * eap_peer_tls_derive_session_id(struct eap_sm *sm,
|
|||||||
u8 *out;
|
u8 *out;
|
||||||
|
|
||||||
if (eap_type == EAP_TYPE_TLS && data->tls_v13) {
|
if (eap_type == EAP_TYPE_TLS && data->tls_v13) {
|
||||||
*len = 64;
|
u8 *id, *method_id;
|
||||||
return eap_peer_tls_derive_key(sm, data,
|
|
||||||
"EXPORTER_EAP_TLS_Session-Id",
|
/* Session-Id = <EAP-Type> || Method-Id
|
||||||
64);
|
* Method-Id = TLS-Exporter("EXPORTER_EAP_TLS_Method-Id",
|
||||||
|
* "", 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", 64);
|
||||||
|
if (!method_id) {
|
||||||
|
os_free(id);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
id[0] = eap_type;
|
||||||
|
os_memcpy(id + 1, method_id, 64);
|
||||||
|
os_free(method_id);
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user