Home | History | Annotate | Download | only in eapol_auth

Lines Matching defs: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)
48 static void eapol_auth_logger(struct eapol_authenticator *eapol,
52 if (eapol->cb.logger == NULL)
54 eapol->cb.logger(eapol->conf.ctx, addr, level, txt);
58 static void eapol_auth_vlogger(struct eapol_authenticator *eapol,
66 if (eapol->cb.logger == NULL)
78 eapol_auth_logger(eapol, addr, level, format);
95 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG,
98 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta,
109 eapol_auth_logger(sm->eapol, sm->addr,
117 wpa_printf(MSG_DEBUG, "EAPOL: Drop EAPOL TX to " MACSTR
118 " while waiting for EAPOL-Start",
124 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_DEBUG,
127 sm->eapol->cb.eapol_send(sm->eapol->conf.ctx, sm->sta,
221 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0,
268 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_WARNING,
273 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO,
278 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 0,
299 eapol_auth_vlogger(sm->eapol, sm->addr, EAPOL_LOGGER_INFO,
304 sm->eapol->cb.finished(sm->eapol->conf.ctx, sm->sta, 1,
611 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta,
758 eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
766 if (eapol == NULL)
779 sm->eapol = eapol;
791 sm->reAuthPeriod = eapol->conf.eap_reauth_period;
792 sm->reAuthEnabled = eapol->conf.eap_reauth_period > 0 ? TRUE : FALSE;
802 if (!eapol->conf.wpa &&
803 (eapol->default_wep_key || eapol->conf.individual_wep_key_len > 0))
807 if (eapol->conf.wpa)
813 eap_conf.eap_server = eapol->conf.eap_server;
814 eap_conf.ssl_ctx = eapol->conf.ssl_ctx;
815 eap_conf.msg_ctx = eapol->conf.msg_ctx;
816 eap_conf.eap_sim_db_priv = eapol->conf.eap_sim_db_priv;
817 eap_conf.pac_opaque_encr_key = eapol->conf.pac_opaque_encr_key;
818 eap_conf.eap_fast_a_id = eapol->conf.eap_fast_a_id;
819 eap_conf.eap_fast_a_id_len = eapol->conf.eap_fast_a_id_len;
820 eap_conf.eap_fast_a_id_info = eapol->conf.eap_fast_a_id_info;
821 eap_conf.eap_fast_prov = eapol->conf.eap_fast_prov;
822 eap_conf.pac_key_lifetime = eapol->conf.pac_key_lifetime;
823 eap_conf.pac_key_refresh_time = eapol->conf.pac_key_refresh_time;
824 eap_conf.eap_sim_aka_result_ind = eapol->conf.eap_sim_aka_result_ind;
825 eap_conf.tnc = eapol->conf.tnc;
826 eap_conf.wps = eapol->conf.wps;
830 eap_conf.fragment_size = eapol->conf.fragment_size;
831 eap_conf.pwd_group = eapol->conf.pwd_group;
832 eap_conf.pbc_in_m1 = eapol->conf.pbc_in_m1;
868 static int eapol_sm_sta_entry_alive(struct eapol_authenticator *eapol,
871 return eapol->cb.sta_entry_alive(eapol->conf.ctx, addr);
877 struct eapol_authenticator *eapol = sm->eapol;
886 * Allow EAPOL state machines to run as long as there are state
900 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
902 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
904 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
906 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
908 if (sm->initializing || eapol_sm_sta_entry_alive(eapol, addr))
924 if (eapol_sm_sta_entry_alive(eapol, addr) && sm->eap) {
937 wpa_printf(MSG_DEBUG, "EAPOL: aaaEapResp set, "
941 sm->eapol->cb.aaa_send(
942 sm->eapol->conf.ctx, sm->sta,
948 if (eapol_sm_sta_entry_alive(eapol, addr))
949 sm->eapol->cb.eapol_event(sm->eapol->conf.ctx, sm->sta,
962 * eapol_auth_step - Advance EAPOL state machines
963 * @sm: EAPOL state machine
965 * This function is called to advance EAPOL state machines after any change
1002 return sm->eapol->cb.get_eap_user(sm->eapol->conf.ctx, identity,
1010 *len = sm->eapol->conf.eap_req_id_text_len;
1011 return sm->eapol->conf.eap_req_id_text;
1112 struct eapol_authenticator *eapol;
1114 eapol = os_zalloc(sizeof(*eapol));
1115 if (eapol == NULL)
1118 if (eapol_auth_conf_clone(&eapol->conf, conf) < 0) {
1119 os_free(eapol);
1125 eapol->default_wep_key_idx = 1;
1128 eapol->cb.eapol_send = cb->eapol_send;
1129 eapol->cb.aaa_send = cb->aaa_send;
1130 eapol->cb.finished = cb->finished;
1131 eapol->cb.get_eap_user = cb->get_eap_user;
1132 eapol->cb.sta_entry_alive = cb->sta_entry_alive;
1133 eapol->cb.logger = cb->logger;
1134 eapol->cb.set_port_authorized = cb->set_port_authorized;
1135 eapol->cb.abort_auth = cb->abort_auth;
1136 eapol->cb.tx_key = cb->tx_key;
1137 eapol->cb.eapol_event = cb->eapol_event;
1139 return eapol;
1143 void eapol_auth_deinit(struct eapol_authenticator *eapol)
1145 if (eapol == NULL)
1148 eapol_auth_conf_free(&eapol->conf);
1149 os_free(eapol->default_wep_key);
1150 os_free(eapol);