3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

eap-tls-common: Handle common tunnel ready cb

This commit is contained in:
Tim Kourt 2018-11-29 14:41:37 -08:00 committed by Denis Kenzior
parent c2d3a84e3a
commit c1f791afc4

View File

@ -196,6 +196,23 @@ static void eap_tls_tunnel_data_received(const uint8_t *data, size_t data_len,
static void eap_tls_tunnel_ready(const char *peer_identity, void *user_data) static void eap_tls_tunnel_ready(const char *peer_identity, void *user_data)
{ {
struct eap_state *eap = user_data;
struct eap_tls_state *eap_tls = eap_get_data(eap);
/* TODO: if we have a CA certificate require non-NULL peer_identity */
/*
* Since authenticator may not send us EAP-Success/EAP-Failure
* in cleartext for the outer EAP method, we reinforce
* the completion with a timer.
*/
eap_start_complete_timeout(eap);
if (!eap_tls->variant_ops->tunnel_ready)
return;
if (!eap_tls->variant_ops->tunnel_ready(eap, peer_identity))
l_tls_close(eap_tls->tunnel);
} }
static void eap_tls_tunnel_disconnected(enum l_tls_alert_desc reason, static void eap_tls_tunnel_disconnected(enum l_tls_alert_desc reason,