Home | History | Annotate | Download | only in eapol_auth

Lines Matching refs:eapol

2  * IEEE 802.1X-2004 Authenticator - EAPOL state machine
27 /* EAPOL state machines are described in IEEE Std 802.1X-2004, Chap. 8.2 */
30 sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 1)
32 sm->eapol->cb.set_port_authorized(sm->eapol->conf.ctx, sm->sta, 0)
38 #define abortAuth() sm->eapol->cb.abort_auth(sm->eapol->conf.ctx, sm->sta)
39 #define txKey() sm->eapol->cb.tx_key(sm->eapol->conf.ctx, sm->sta)
49 static void eapol_auth_logger(struct eapol_authenticator *eapol,
53 if (eapol->cb.logger == NULL)
55 eapol->cb.logger(eapol->conf.ctx, addr, level, txt);
59 static void eapol_auth_vlogger(struct eapol_authenticator *eapol,
67 if (eapol->cb.logger == NULL)
79 eapol_auth_logger(eapol, addr, level, format);
96 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG,
99 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta,
110 eapol_auth_logger(sm->eapol, sm->addr,
118 wpa_printf(MSG_DEBUG, "EAPOL: Drop EAPOL TX to " MACSTR
119 " while waiting for EAPOL-Start",
125 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG,
128 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta,
205 * EAPOL-Key exchange is not possible in this state. It is possible to
234 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0,
282 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_WARNING,
287 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO,
292 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0,
313 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO,
318 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 1,
625 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta,
772 eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
780 if (eapol == NULL)
793 sm->eapol = eapol;
805 sm->reAuthPeriod = eapol->conf.eap_reauth_period;
806 sm->reAuthEnabled = eapol->conf.eap_reauth_period > 0 ? TRUE : FALSE;
816 if (!eapol->conf.wpa &&
817 (eapol->default_wep_key || eapol->conf.individual_wep_key_len > 0))
821 if (eapol->conf.wpa)
827 eap_conf.eap_server = eapol->conf.eap_server;
828 eap_conf.ssl_ctx = eapol->conf.ssl_ctx;
829 eap_conf.msg_ctx = eapol->conf.msg_ctx;
830 eap_conf.eap_sim_db_priv = eapol->conf.eap_sim_db_priv;
831 eap_conf.pac_opaque_encr_key = eapol->conf.pac_opaque_encr_key;
832 eap_conf.eap_fast_a_id = eapol->conf.eap_fast_a_id;
833 eap_conf.eap_fast_a_id_len = eapol->conf.eap_fast_a_id_len;
834 eap_conf.eap_fast_a_id_info = eapol->conf.eap_fast_a_id_info;
835 eap_conf.eap_fast_prov = eapol->conf.eap_fast_prov;
836 eap_conf.pac_key_lifetime = eapol->conf.pac_key_lifetime;
837 eap_conf.pac_key_refresh_time = eapol->conf.pac_key_refresh_time;
838 eap_conf.eap_sim_aka_result_ind = eapol->conf.eap_sim_aka_result_ind;
839 eap_conf.tnc = eapol->conf.tnc;
840 eap_conf.wps = eapol->conf.wps;
844 eap_conf.fragment_size = eapol->conf.fragment_size;
845 eap_conf.pwd_group = eapol->conf.pwd_group;
846 eap_conf.pbc_in_m1 = eapol->conf.pbc_in_m1;
847 eap_conf.server_id = eapol->conf.server_id;
848 eap_conf.server_id_len = eapol->conf.server_id_len;
849 eap_conf.erp = eapol->conf.erp;
850 eap_conf.tls_session_lifetime = eapol->conf.tls_session_lifetime;
897 static int eapol_sm_sta_entry_alive(struct eapol_authenticator *eapol,
900 return eapol->cb.sta_entry_alive(eapol->conf.ctx, addr);
906 struct eapol_authenticator *eapol = sm->eapol;
915 * Allow EAPOL state machines to run as long as there are state
929 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
931 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
933 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
935 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
937 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
953 if (eapol_sm_sta_entry_alive(eapol, addr) && sm->eap) {
966 wpa_printf(MSG_DEBUG, "EAPOL: aaaEapResp set, "
970 sm->eapol->cb.aaa_send(
971 sm->eapol->conf.ctx, sm->sta,
977 if (eapol_sm_sta_entry_alive(eapol, addr))
978 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta,
991 * eapol_auth_step - Advance EAPOL state machines
992 * @sm: EAPOL state machine
994 * This function is called to advance EAPOL state machines after any change
1033 ret = sm->eapol->cb.get_eap_user(sm->eapol->conf.ctx, identity,
1044 *len = sm->eapol->conf.eap_req_id_text_len;
1045 return sm->eapol->conf.eap_req_id_text;
1052 return sm->eapol->conf.erp_send_reauth_start;
1059 return sm->eapol->conf.erp_domain;
1067 return sm->eapol->cb.erp_get_key(sm->eapol->conf.ctx, keyname);
1074 return sm->eapol->cb.erp_add_key(sm->eapol->conf.ctx, erp);
1104 wpa_printf(MSG_DEBUG, "EAPOL: External reauthentication trigger for "
1114 wpa_printf(MSG_DEBUG, "EAPOL: External configuration operation for "
1279 struct eapol_authenticator *eapol;
1281 eapol = os_zalloc(sizeof(*eapol));
1282 if (eapol == NULL)
1285 if (eapol_auth_conf_clone(&eapol->conf, conf) < 0) {
1286 os_free(eapol);
1292 eapol->default_wep_key_idx = 1;
1295 eapol->cb.eapol_send = cb->eapol_send;
1296 eapol->cb.aaa_send = cb->aaa_send;
1297 eapol->cb.finished = cb->finished;
1298 eapol->cb.get_eap_user = cb->get_eap_user;
1299 eapol
1300 eapol->cb.logger = cb->logger;
1301 eapol->cb.set_port_authorized = cb->set_port_authorized;
1302 eapol->cb.abort_auth = cb->abort_auth;
1303 eapol->cb.tx_key = cb->tx_key;
1304 eapol->cb.eapol_event = cb->eapol_event;
1305 eapol->cb.erp_get_key = cb->erp_get_key;
1306 eapol->cb.erp_add_key = cb->erp_add_key;
1308 return eapol;
1312 void eapol_auth_deinit(struct eapol_authenticator *eapol)
1314 if (eapol == NULL)
1317 eapol_auth_conf_free(&eapol->conf);
1318 os_free(eapol->default_wep_key);
1319 os_free(eapol);