Add new ctrl_iface event for EAP methods proposed by the server

This makes it easier for external programs to probe EAP server
preferences and potentially automatically detect which method
could be used.
This commit is contained in:
Jouni Malinen 2010-02-11 19:48:36 +02:00
parent e748062b58
commit 7796f20edc
2 changed files with 8 additions and 0 deletions

View file

@ -40,6 +40,8 @@ extern "C" {
#define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION " #define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION "
/** EAP authentication started (EAP-Request/Identity received) */ /** EAP authentication started (EAP-Request/Identity received) */
#define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED " #define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED "
/** EAP method proposed by the server */
#define WPA_EVENT_EAP_PROPOSED_METHOD "CTRL-EVENT-EAP-PROPOSED-METHOD "
/** EAP method selected */ /** EAP method selected */
#define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD " #define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD "
/** EAP authentication completed successfully */ /** EAP authentication completed successfully */

View file

@ -228,9 +228,15 @@ SM_STATE(EAP, GET_METHOD)
if (!eap_sm_allowMethod(sm, sm->reqVendor, method)) { if (!eap_sm_allowMethod(sm, sm->reqVendor, method)) {
wpa_printf(MSG_DEBUG, "EAP: vendor %u method %u not allowed", wpa_printf(MSG_DEBUG, "EAP: vendor %u method %u not allowed",
sm->reqVendor, method); sm->reqVendor, method);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_PROPOSED_METHOD
"vendor=%u method=%u -> NAK",
sm->reqVendor, method);
goto nak; goto nak;
} }
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_PROPOSED_METHOD
"vendor=%u method=%u", sm->reqVendor, method);
/* /*
* RFC 4137 does not define specific operation for fast * RFC 4137 does not define specific operation for fast
* re-authentication (session resumption). The design here is to allow * re-authentication (session resumption). The design here is to allow