Home
last modified time | relevance | path

Searched refs:sm (Results 1 – 25 of 400) sorted by relevance

12345678910>>...16

/external/wpa_supplicant_8/src/pae/
Dieee802_1x_cp.c97 static int changed_cipher(struct ieee802_1x_cp_sm *sm) in changed_cipher() argument
99 return sm->confidentiality_offset != sm->cipher_offset || in changed_cipher()
100 sm->current_cipher_suite != sm->cipher_suite; in changed_cipher()
104 static int changed_connect(struct ieee802_1x_cp_sm *sm) in changed_connect() argument
106 return sm->connect != SECURE || sm->chgd_server || changed_cipher(sm); in changed_connect()
114 sm->controlled_port_enabled = FALSE; in SM_STATE()
115 secy_cp_control_enable_port(sm->kay, sm->controlled_port_enabled); in SM_STATE()
117 sm->port_valid = FALSE; in SM_STATE()
119 os_free(sm->lki); in SM_STATE()
120 sm->lki = NULL; in SM_STATE()
[all …]
/external/wpa_supplicant_8/src/eapol_supp/
Deapol_supp_sm.c151 static void eapol_sm_txLogoff(struct eapol_sm *sm);
152 static void eapol_sm_txStart(struct eapol_sm *sm);
153 static void eapol_sm_processKey(struct eapol_sm *sm);
154 static void eapol_sm_getSuppRsp(struct eapol_sm *sm);
155 static void eapol_sm_txSuppRsp(struct eapol_sm *sm);
156 static void eapol_sm_abortSupp(struct eapol_sm *sm);
157 static void eapol_sm_abort_cached(struct eapol_sm *sm);
159 static void eapol_sm_set_port_authorized(struct eapol_sm *sm);
160 static void eapol_sm_set_port_unauthorized(struct eapol_sm *sm);
167 struct eapol_sm *sm = timeout_ctx; in eapol_port_timers_tick() local
[all …]
Deapol_supp_sm.h305 void eapol_sm_deinit(struct eapol_sm *sm);
306 void eapol_sm_step(struct eapol_sm *sm);
307 int eapol_sm_get_status(struct eapol_sm *sm, char *buf, size_t buflen,
309 int eapol_sm_get_mib(struct eapol_sm *sm, char *buf, size_t buflen);
310 void eapol_sm_configure(struct eapol_sm *sm, int heldPeriod, int authPeriod,
312 int eapol_sm_rx_eapol(struct eapol_sm *sm, const u8 *src, const u8 *buf,
314 void eapol_sm_notify_tx_eapol_key(struct eapol_sm *sm);
315 void eapol_sm_notify_portEnabled(struct eapol_sm *sm, Boolean enabled);
316 void eapol_sm_notify_portValid(struct eapol_sm *sm, Boolean valid);
317 void eapol_sm_notify_eap_success(struct eapol_sm *sm, Boolean success);
[all …]
/external/wpa_supplicant_8/src/eap_server/
Deap_server.c33 static int eap_sm_calculateTimeout(struct eap_sm *sm, int retransCount,
36 static void eap_sm_parseEapResp(struct eap_sm *sm, const struct wpabuf *resp);
38 static struct wpabuf * eap_sm_buildSuccess(struct eap_sm *sm, u8 id);
39 static struct wpabuf * eap_sm_buildFailure(struct eap_sm *sm, u8 id);
40 static int eap_sm_nextId(struct eap_sm *sm, int id);
41 static void eap_sm_Policy_update(struct eap_sm *sm, const u8 *nak_list,
43 static EapType eap_sm_Policy_getNextMethod(struct eap_sm *sm, int *vendor);
44 static int eap_sm_Policy_getDecision(struct eap_sm *sm);
45 static Boolean eap_sm_Policy_doPickUp(struct eap_sm *sm, EapType method);
48 static int eap_get_erp_send_reauth_start(struct eap_sm *sm) in eap_get_erp_send_reauth_start() argument
[all …]
Deap_server_ttls.c24 static void eap_ttls_reset(struct eap_sm *sm, void *priv);
79 static void eap_ttls_valid_session(struct eap_sm *sm, in eap_ttls_valid_session() argument
84 if (!sm->tls_session_lifetime) in eap_ttls_valid_session()
87 buf = wpabuf_alloc(1 + 1 + sm->identity_len); in eap_ttls_valid_session()
91 if (sm->identity) { in eap_ttls_valid_session()
94 if (sm->identity_len <= 255) in eap_ttls_valid_session()
95 id_len = sm->identity_len; in eap_ttls_valid_session()
99 wpabuf_put_data(buf, sm->identity, id_len); in eap_ttls_valid_session()
332 static u8 * eap_ttls_implicit_challenge(struct eap_sm *sm, in eap_ttls_implicit_challenge() argument
335 return eap_server_tls_derive_key(sm, &data->ssl, "ttls challenge", in eap_ttls_implicit_challenge()
[all …]
Deap_server_gtc.c21 static void * eap_gtc_init(struct eap_sm *sm) in eap_gtc_init() argument
31 if (sm->m && sm->m->vendor == EAP_VENDOR_IETF && in eap_gtc_init()
32 sm->m->method == EAP_TYPE_FAST) { in eap_gtc_init()
43 static void eap_gtc_reset(struct eap_sm *sm, void *priv) in eap_gtc_reset() argument
50 static struct wpabuf * eap_gtc_buildReq(struct eap_sm *sm, void *priv, u8 id) in eap_gtc_buildReq() argument
77 static Boolean eap_gtc_check(struct eap_sm *sm, void *priv, in eap_gtc_check() argument
93 static void eap_gtc_process(struct eap_sm *sm, void *priv, in eap_gtc_process() argument
131 if (sm->identity && sm->require_identity_match && in eap_gtc_process()
132 (pos2 - pos != (int) sm->identity_len || in eap_gtc_process()
133 os_memcmp(pos, sm->identity, sm->identity_len))) { in eap_gtc_process()
[all …]
Deap_server_fast.c22 static void eap_fast_reset(struct eap_sm *sm, void *priv);
71 static int eap_fast_process_phase2_start(struct eap_sm *sm,
111 static EapType eap_fast_req_failure(struct eap_sm *sm, in eap_fast_req_failure() argument
272 static void eap_fast_derive_key_auth(struct eap_sm *sm, in eap_fast_derive_key_auth() argument
281 sks = eap_fast_derive_key(sm->ssl_ctx, data->ssl.conn, in eap_fast_derive_key_auth()
302 static void eap_fast_derive_key_provisioning(struct eap_sm *sm, in eap_fast_derive_key_provisioning() argument
307 eap_fast_derive_key(sm->ssl_ctx, data->ssl.conn, in eap_fast_derive_key_provisioning()
333 static int eap_fast_get_phase2_key(struct eap_sm *sm, in eap_fast_get_phase2_key() argument
351 if ((key = data->phase2_method->getKey(sm, data->phase2_priv, in eap_fast_get_phase2_key()
378 static int eap_fast_update_icmk(struct eap_sm *sm, struct eap_fast_data *data) in eap_fast_update_icmk() argument
[all …]
Deap_server_peap.c29 static void eap_peap_reset(struct eap_sm *sm, void *priv);
103 static void eap_peap_valid_session(struct eap_sm *sm, in eap_peap_valid_session() argument
108 if (!sm->tls_session_lifetime || in eap_peap_valid_session()
109 tls_connection_resumed(sm->ssl_ctx, data->ssl.conn)) in eap_peap_valid_session()
112 buf = wpabuf_alloc(1 + 1 + sm->identity_len); in eap_peap_valid_session()
116 if (sm->identity) { in eap_peap_valid_session()
119 if (sm->identity_len <= 255) in eap_peap_valid_session()
120 id_len = sm->identity_len; in eap_peap_valid_session()
124 wpabuf_put_data(buf, sm->identity, id_len); in eap_peap_valid_session()
132 static void eap_peap_req_success(struct eap_sm *sm, in eap_peap_req_success() argument
[all …]
/external/wpa_supplicant_8/src/eap_peer/
Deap.c39 static Boolean eap_sm_allowMethod(struct eap_sm *sm, int vendor,
41 static struct wpabuf * eap_sm_buildNak(struct eap_sm *sm, int id);
42 static void eap_sm_processIdentity(struct eap_sm *sm,
44 static void eap_sm_processNotify(struct eap_sm *sm, const struct wpabuf *req);
46 static void eap_sm_parseEapReq(struct eap_sm *sm, const struct wpabuf *req);
51 static void eap_sm_request(struct eap_sm *sm, enum wpa_ctrl_req_type field,
56 static Boolean eapol_get_bool(struct eap_sm *sm, enum eapol_bool_var var) in eapol_get_bool() argument
58 return sm->eapol_cb->get_bool(sm->eapol_ctx, var); in eapol_get_bool()
62 static void eapol_set_bool(struct eap_sm *sm, enum eapol_bool_var var, in eapol_set_bool() argument
65 sm->eapol_cb->set_bool(sm->eapol_ctx, var, value); in eapol_set_bool()
[all …]
Deap.h320 void eap_peer_sm_deinit(struct eap_sm *sm);
321 int eap_peer_sm_step(struct eap_sm *sm);
322 void eap_sm_abort(struct eap_sm *sm);
323 int eap_sm_get_status(struct eap_sm *sm, char *buf, size_t buflen,
325 const char * eap_sm_get_method_name(struct eap_sm *sm);
326 struct wpabuf * eap_sm_buildIdentity(struct eap_sm *sm, int id, int encrypted);
327 void eap_sm_request_identity(struct eap_sm *sm);
328 void eap_sm_request_password(struct eap_sm *sm);
329 void eap_sm_request_new_password(struct eap_sm *sm);
330 void eap_sm_request_pin(struct eap_sm *sm);
[all …]
Deap_tls.c18 static void eap_tls_deinit(struct eap_sm *sm, void *priv);
32 static void * eap_tls_init(struct eap_sm *sm) in eap_tls_init() argument
35 struct eap_peer_config *config = eap_get_config(sm); in eap_tls_init()
37 ((sm->init_phase2 ? config->private_key2 : config->private_key) in eap_tls_init()
39 (sm->init_phase2 ? config->engine2 : config->engine) == 0)) { in eap_tls_init()
48 data->ssl_ctx = sm->init_phase2 && sm->ssl_ctx2 ? sm->ssl_ctx2 : in eap_tls_init()
49 sm->ssl_ctx; in eap_tls_init()
51 if (eap_peer_tls_ssl_init(sm, &data->ssl, config, EAP_TYPE_TLS)) { in eap_tls_init()
53 eap_tls_deinit(sm, data); in eap_tls_init()
57 eap_sm_request_pin(sm); in eap_tls_init()
[all …]
Deap_i.h90 void * (*init)(struct eap_sm *sm);
99 void (*deinit)(struct eap_sm *sm, void *priv);
116 struct wpabuf * (*process)(struct eap_sm *sm, void *priv,
126 Boolean (*isKeyAvailable)(struct eap_sm *sm, void *priv);
139 u8 * (*getKey)(struct eap_sm *sm, void *priv, size_t *len);
155 int (*get_status)(struct eap_sm *sm, void *priv, char *buf,
168 Boolean (*has_reauth_data)(struct eap_sm *sm, void *priv);
181 void (*deinit_for_reauth)(struct eap_sm *sm, void *priv);
193 void * (*init_for_reauth)(struct eap_sm *sm, void *priv);
206 const u8 * (*get_identity)(struct eap_sm *sm, void *priv, size_t *len);
[all …]
/external/wpa_supplicant_8/src/eapol_auth/
Deapol_auth_sm.c23 #define STATE_MACHINE_ADDR sm->addr
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)
35 #define txCannedFail() eapol_auth_tx_canned_eap(sm, 0)
36 #define txCannedSuccess() eapol_auth_tx_canned_eap(sm, 1)
37 #define txReq() eapol_auth_tx_req(sm)
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)
43 static void eapol_sm_step_run(struct eapol_state_machine *sm);
45 static void eapol_auth_initialize(struct eapol_state_machine *sm);
[all …]
Deapol_auth_dump.c121 int eapol_auth_dump_state(struct eapol_state_machine *sm, char *buf, in eapol_auth_dump_state() argument
132 sm->aWhile, sm->quietWhile, sm->reAuthWhen); in eapol_auth_dump_state()
158 _SB(sm->authAbort), in eapol_auth_dump_state()
159 _SB(sm->authFail), in eapol_auth_dump_state()
160 port_state_txt(sm->authPortStatus), in eapol_auth_dump_state()
161 _SB(sm->authStart), in eapol_auth_dump_state()
162 _SB(sm->authTimeout), in eapol_auth_dump_state()
163 _SB(sm->authSuccess), in eapol_auth_dump_state()
164 _SB(sm->eap_if->eapFail), in eapol_auth_dump_state()
165 _SB(sm->eapolEap), in eapol_auth_dump_state()
[all …]
/external/wpa_supplicant_8/src/rsn_supp/
Dwpa.c46 int wpa_eapol_key_send(struct wpa_sm *sm, struct wpa_ptk *ptk, in wpa_eapol_key_send() argument
51 size_t mic_len = wpa_mic_len(sm->key_mgmt); in wpa_eapol_key_send()
53 if (is_zero_ether_addr(dest) && is_zero_ether_addr(sm->bssid)) { in wpa_eapol_key_send()
58 if (wpa_sm_get_bssid(sm, sm->bssid) < 0) { in wpa_eapol_key_send()
59 wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, in wpa_eapol_key_send()
63 dest = sm->bssid; in wpa_eapol_key_send()
64 wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, in wpa_eapol_key_send()
76 wpa_eapol_key_mic(ptk->kck, ptk->kck_len, sm->key_mgmt, ver, in wpa_eapol_key_send()
78 wpa_msg(sm->ctx->msg_ctx, MSG_ERROR, in wpa_eapol_key_send()
80 ver, sm->key_mgmt); in wpa_eapol_key_send()
[all …]
Dpreauth.c37 void pmksa_candidate_free(struct wpa_sm *sm) in pmksa_candidate_free() argument
41 if (sm == NULL) in pmksa_candidate_free()
44 dl_list_for_each_safe(entry, n, &sm->pmksa_candidates, in pmksa_candidate_free()
55 struct wpa_sm *sm = ctx; in rsn_preauth_receive() local
60 if (sm->preauth_eapol == NULL || in rsn_preauth_receive()
61 is_zero_ether_addr(sm->preauth_bssid) || in rsn_preauth_receive()
62 os_memcmp(sm->preauth_bssid, src_addr, ETH_ALEN) != 0) { in rsn_preauth_receive()
69 eapol_sm_rx_eapol(sm->preauth_eapol, src_addr, buf, len); in rsn_preauth_receive()
77 struct wpa_sm *sm = ctx; in rsn_preauth_eapol_cb() local
95 sm->pmk_len = pmk_len; in rsn_preauth_eapol_cb()
[all …]
Dwpa_ft.c21 int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr, in wpa_derive_ptk_ft() argument
27 if (sm->xxkey_len == 0) { in wpa_derive_ptk_ft()
33 wpa_derive_pmk_r0(sm->xxkey, sm->xxkey_len, sm->ssid, in wpa_derive_ptk_ft()
34 sm->ssid_len, sm->mobility_domain, in wpa_derive_ptk_ft()
35 sm->r0kh_id, sm->r0kh_id_len, sm->own_addr, in wpa_derive_ptk_ft()
36 sm->pmk_r0, sm->pmk_r0_name); in wpa_derive_ptk_ft()
37 wpa_hexdump_key(MSG_DEBUG, "FT: PMK-R0", sm->pmk_r0, PMK_LEN); in wpa_derive_ptk_ft()
39 sm->pmk_r0_name, WPA_PMK_NAME_LEN); in wpa_derive_ptk_ft()
40 wpa_derive_pmk_r1(sm->pmk_r0, sm->pmk_r0_name, sm->r1kh_id, in wpa_derive_ptk_ft()
41 sm->own_addr, sm->pmk_r1, sm->pmk_r1_name); in wpa_derive_ptk_ft()
[all …]
Dwpa_i.h162 static inline void wpa_sm_set_state(struct wpa_sm *sm, enum wpa_states state) in wpa_sm_set_state() argument
164 WPA_ASSERT(sm->ctx->set_state); in wpa_sm_set_state()
165 sm->ctx->set_state(sm->ctx->ctx, state); in wpa_sm_set_state()
168 static inline enum wpa_states wpa_sm_get_state(struct wpa_sm *sm) in wpa_sm_get_state() argument
170 WPA_ASSERT(sm->ctx->get_state); in wpa_sm_get_state()
171 return sm->ctx->get_state(sm->ctx->ctx); in wpa_sm_get_state()
174 static inline void wpa_sm_deauthenticate(struct wpa_sm *sm, int reason_code) in wpa_sm_deauthenticate() argument
176 WPA_ASSERT(sm->ctx->deauthenticate); in wpa_sm_deauthenticate()
177 sm->ctx->deauthenticate(sm->ctx->ctx, reason_code); in wpa_sm_deauthenticate()
180 static inline int wpa_sm_set_key(struct wpa_sm *sm, enum wpa_alg alg, in wpa_sm_set_key() argument
[all …]
Dwpa.h117 void wpa_sm_deinit(struct wpa_sm *sm);
118 void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid);
119 void wpa_sm_notify_disassoc(struct wpa_sm *sm);
120 void wpa_sm_set_pmk(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
122 void wpa_sm_set_pmk_from_pmksa(struct wpa_sm *sm);
123 void wpa_sm_set_fast_reauth(struct wpa_sm *sm, int fast_reauth);
124 void wpa_sm_set_scard_ctx(struct wpa_sm *sm, void *scard_ctx);
125 void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config);
126 void wpa_sm_set_own_addr(struct wpa_sm *sm, const u8 *addr);
127 void wpa_sm_set_ifname(struct wpa_sm *sm, const char *ifname,
[all …]
Dtdls.c85 static void wpa_tdls_peer_free(struct wpa_sm *sm, struct wpa_tdls_peer *peer);
86 static void wpa_tdls_disable_peer_link(struct wpa_sm *sm,
88 static int wpa_tdls_send_teardown(struct wpa_sm *sm, const u8 *addr,
159 static int wpa_tdls_get_privacy(struct wpa_sm *sm) in wpa_tdls_get_privacy() argument
166 return sm->pairwise_cipher != WPA_CIPHER_NONE; in wpa_tdls_get_privacy()
177 static int wpa_tdls_del_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) in wpa_tdls_del_key() argument
179 if (wpa_sm_set_key(sm, WPA_ALG_NONE, peer->addr, in wpa_tdls_del_key()
190 static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer) in wpa_tdls_set_key() argument
223 sm->pairwise_cipher); in wpa_tdls_set_key()
229 if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1, in wpa_tdls_set_key()
[all …]
Dpreauth.h16 void pmksa_candidate_free(struct wpa_sm *sm);
17 int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst,
19 void rsn_preauth_deinit(struct wpa_sm *sm);
20 int rsn_preauth_scan_results(struct wpa_sm *sm);
21 void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid,
23 void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid,
25 void rsn_preauth_candidate_process(struct wpa_sm *sm);
26 int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen,
28 int rsn_preauth_in_progress(struct wpa_sm *sm);
32 static inline void pmksa_candidate_free(struct wpa_sm *sm) in pmksa_candidate_free() argument
[all …]
/external/wpa_supplicant_8/src/ap/
Dwpa_auth.c33 #define STATE_MACHINE_ADDR sm->addr
37 static int wpa_sm_step(struct wpa_state_machine *sm);
41 static int wpa_aead_decrypt(struct wpa_state_machine *sm, struct wpa_ptk *ptk,
47 static void wpa_request_new_ptk(struct wpa_state_machine *sm);
52 static int wpa_derive_ptk(struct wpa_state_machine *sm, const u8 *snonce,
61 static u8 * ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos);
173 int (*cb)(struct wpa_state_machine *sm, void *ctx), in wpa_auth_for_each_sta() argument
237 static int wpa_use_aes_cmac(struct wpa_state_machine *sm) in wpa_use_aes_cmac() argument
241 if (wpa_key_mgmt_ft(sm->wpa_key_mgmt)) in wpa_use_aes_cmac()
245 if (wpa_key_mgmt_sha256(sm->wpa_key_mgmt)) in wpa_use_aes_cmac()
[all …]
Dwpa_auth_ft.c27 static int wpa_ft_send_rrb_auth_resp(struct wpa_state_machine *sm,
315 static int wpa_ft_pull_pmk_r1(struct wpa_state_machine *sm, in wpa_ft_pull_pmk_r1() argument
322 r0kh = sm->wpa_auth->conf.r0kh_list; in wpa_ft_pull_pmk_r1()
324 if (r0kh->id_len == sm->r0kh_id_len && in wpa_ft_pull_pmk_r1()
325 os_memcmp_const(r0kh->id, sm->r0kh_id, sm->r0kh_id_len) == in wpa_ft_pull_pmk_r1()
332 sm->r0kh_id, sm->r0kh_id_len); in wpa_ft_pull_pmk_r1()
343 os_memcpy(frame.ap_address, sm->wpa_auth->addr, ETH_ALEN); in wpa_ft_pull_pmk_r1()
352 os_memcpy(sm->ft_pending_pull_nonce, f.nonce, in wpa_ft_pull_pmk_r1()
355 os_memcpy(f.r1kh_id, sm->wpa_auth->conf.r1_key_holder, FT_R1KH_ID_LEN); in wpa_ft_pull_pmk_r1()
356 os_memcpy(f.s1kh_id, sm->addr, ETH_ALEN); in wpa_ft_pull_pmk_r1()
[all …]
/external/e2fsprogs/lib/ext2fs/
Dsparse_io.c60 static void free_sparse_blocks(struct sparse_map *sm) in free_sparse_blocks() argument
64 for (i = 0; i < sm->blocks_count; ++i) in free_sparse_blocks()
65 free(sm->blocks[i]); in free_sparse_blocks()
66 free(sm->blocks); in free_sparse_blocks()
67 sm->blocks = NULL; in free_sparse_blocks()
73 struct sparse_map *sm = priv; in sparse_import_segment() local
76 if (!nr_blocks || len % sm->block_size) in sparse_import_segment()
79 return sparse_write_blk(sm->channel, block, nr_blocks, data); in sparse_import_segment()
83 struct sparse_map *sm, io_channel io) in io_manager_import_sparse() argument
103 sm->block_size = sparse_file_block_size(sparse_file); in io_manager_import_sparse()
[all …]
/external/wpa_supplicant_8/src/wps/
Dwps_upnp.c460 static void upnp_wps_device_send_event(struct upnp_wps_device_sm *sm) in upnp_wps_device_send_event() argument
473 if (dl_list_empty(&sm->subscriptions)) { in upnp_wps_device_send_event()
479 if (now.sec != sm->last_event_sec) { in upnp_wps_device_send_event()
480 sm->last_event_sec = now.sec; in upnp_wps_device_send_event()
481 sm->num_events_in_sec = 1; in upnp_wps_device_send_event()
483 sm->num_events_in_sec++; in upnp_wps_device_send_event()
491 if (sm->num_events_in_sec > MAX_EVENTS_PER_SEC && in upnp_wps_device_send_event()
492 sm->wlanevent_type == in upnp_wps_device_send_event()
497 sm->num_events_in_sec); in upnp_wps_device_send_event()
506 if (sm->wlanevent) in upnp_wps_device_send_event()
[all …]

12345678910>>...16