]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP: Extend Session-Id derivation with TLS 1.3 to PEAP and EAP-TTLS
authorAlexander Clouter <alex@digriz.org.uk>
Fri, 16 Oct 2020 08:49:38 +0000 (09:49 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 20 Feb 2021 15:36:57 +0000 (17:36 +0200)
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 <alex@digriz.org.uk>
src/eap_peer/eap_tls_common.c
src/eap_server/eap_server_tls_common.c

index ab1067878b8f64e4397c175b83b2ab45d8aeebc9..c1837db06221e321de3dd788c764db42773355ac 100644 (file)
@@ -413,9 +413,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 = <EAP-Type> || Method-Id
                 * Method-Id = TLS-Exporter("EXPORTER_EAP_TLS_Method-Id",
index b38f1e0babd482f8a98a9038643b1b9c81fbaf69..4b832d09725982b9f65ee129682a2eb51ba6089a 100644 (file)
@@ -146,10 +146,10 @@ u8 * eap_server_tls_derive_session_id(struct eap_sm *sm,
 {
        struct tls_random keys;
        u8 *out;
-       const u8 context[] = { EAP_TYPE_TLS };
 
-       if (eap_type == EAP_TYPE_TLS && data->tls_v13) {
+       if (data->tls_v13) {
                u8 *id, *method_id;
+               const u8 context[] = { eap_type };
 
                /* Session-Id = <EAP-Type> || Method-Id
                 * Method-Id = TLS-Exporter("EXPORTER_EAP_TLS_Method-Id",