From a5ee253d620d9d2f995c052c6094b3d20c204c82 Mon Sep 17 00:00:00 2001 From: Alexander Clouter Date: Fri, 16 Oct 2020 09:49:38 +0100 Subject: [PATCH] EAP: Extend Session-Id derivation with TLS 1.3 to PEAP and EAP-TTLS This newer Session-Id/Method-Id derivation is used with PEAP and EAP-TTLS when using TLS 1.3 per draft-ietf-emu-tls-eap-types-00, so do not limit this to only EAP-TLS. Signed-off-by: Alexander Clouter --- components/wpa_supplicant/src/eap_peer/eap_tls_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/wpa_supplicant/src/eap_peer/eap_tls_common.c b/components/wpa_supplicant/src/eap_peer/eap_tls_common.c index c3081f7b17..d126df8213 100644 --- a/components/wpa_supplicant/src/eap_peer/eap_tls_common.c +++ b/components/wpa_supplicant/src/eap_peer/eap_tls_common.c @@ -308,9 +308,9 @@ u8 * eap_peer_tls_derive_session_id(struct eap_sm *sm, struct tls_random keys; u8 *out; - if (eap_type == EAP_TYPE_TLS && data->tls_v13) { + if (data->tls_v13) { u8 *id, *method_id; - const u8 context[] = { EAP_TYPE_TLS }; + const u8 context[] = { eap_type }; /* Session-Id = || Method-Id * Method-Id = TLS-Exporter("EXPORTER_EAP_TLS_Method-Id",