[PATCH] Provide TLS alerts to CLI/UI

Jouni Malinen j
Sat Mar 30 10:15:18 PDT 2013


On Wed, Mar 20, 2013 at 09:22:44AM -0600, Chris Hessing wrote:
> diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
> @@ -1332,12 +1332,21 @@ static void eap_peer_sm_tls_event(void *ctx, 
> enum tls_event ev,
>                                            hash_hex, data->peer_cert.cert);
>                  break;
>          case TLS_ALERT:
> -               if (data->alert.is_local)
> -                       eap_notify_status(sm, "local TLS alert",
> - data->alert.description);
> -               else
> -                       eap_notify_status(sm, "remote TLS alert",
> +         if (data->alert.is_local) {
> +           wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_TLS_ALERT
> +                   "type='local' alert='%s'",
> +                   data->alert.description);

That eap_notify_status() is already delivering this event to the core
wpa_supplicant implementation and adding wpa_msg() there in
wpas_notify_eap_status() would be more appropriate way of adding this
event. That path is already used for providing this information through
the D-Bus interface.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list