]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-TLS peer: Support fragmentation of last message
authorJouni Malinen <j@w1.fi>
Tue, 1 May 2018 14:49:19 +0000 (17:49 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 1 May 2018 14:49:19 +0000 (17:49 +0300)
With TLS v1.3, the Finished message from the client can require
fragmentation. Postpone key derivation and marking of the EAP session
fully completed until all the fragments of that last message are sent to
avoid losing all the subsequent fragments.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/eap_peer/eap_tls.c

index c1820a4cae3ed8f5c36805cc21d7ff53388ebc13..cda73f96354c3aa287bd484b86a6c948bf5f76ae 100644 (file)
@@ -175,6 +175,11 @@ static void eap_tls_success(struct eap_sm *sm, struct eap_tls_data *data,
 {
        wpa_printf(MSG_DEBUG, "EAP-TLS: Done");
 
+       if (data->ssl.tls_out) {
+               wpa_printf(MSG_DEBUG, "EAP-TLS: Fragment(s) remaining");
+               return;
+       }
+
        ret->methodState = METHOD_DONE;
        ret->decision = DECISION_UNCOND_SUCC;