Home
last modified time | relevance | path

Searched refs:wps (Results 1 – 25 of 34) sorted by relevance

12

/external/wpa_supplicant_6/wpa_supplicant/src/wps/
Dwps_enrollee.c23 static int wps_build_mac_addr(struct wps_data *wps, struct wpabuf *msg) in wps_build_mac_addr() argument
28 wpabuf_put_data(msg, wps->mac_addr_e, ETH_ALEN); in wps_build_mac_addr()
33 static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg) in wps_build_wps_state() argument
36 if (wps->wps->ap) in wps_build_wps_state()
37 state = wps->wps->wps_state; in wps_build_wps_state()
49 static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg) in wps_build_e_hash() argument
55 if (os_get_random(wps->snonce, 2 * WPS_SECRET_NONCE_LEN) < 0) in wps_build_e_hash()
57 wpa_hexdump(MSG_DEBUG, "WPS: E-S1", wps->snonce, WPS_SECRET_NONCE_LEN); in wps_build_e_hash()
59 wps->snonce + WPS_SECRET_NONCE_LEN, WPS_SECRET_NONCE_LEN); in wps_build_e_hash()
61 if (wps->dh_pubkey_e == NULL || wps->dh_pubkey_r == NULL) { in wps_build_e_hash()
[all …]
Dwps_registrar.c82 struct wps_context *wps; member
215 static int wps_build_wps_state(struct wps_context *wps, struct wpabuf *msg) in wps_build_wps_state() argument
218 wps->wps_state); in wps_build_wps_state()
221 wpabuf_put_u8(msg, wps->wps_state); in wps_build_wps_state()
227 static void wps_registrar_free_pending_m2(struct wps_context *wps) in wps_registrar_free_pending_m2() argument
230 p = wps->upnp_msgs; in wps_registrar_free_pending_m2()
234 wps->upnp_msgs = p->next; in wps_registrar_free_pending_m2()
251 static int wps_build_ap_setup_locked(struct wps_context *wps, in wps_build_ap_setup_locked() argument
254 if (wps->ap_setup_locked) { in wps_build_ap_setup_locked()
299 methods = reg->wps->config_methods & ~WPS_CONFIG_PUSHBUTTON; in wps_build_sel_reg_config_methods()
[all …]
Dwps_common.c64 int wps_derive_keys(struct wps_data *wps) in wps_derive_keys() argument
72 if (wps->dh_privkey == NULL) { in wps_derive_keys()
77 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys()
83 dh_shared = dh_derive_shared(pubkey, wps->dh_privkey, in wps_derive_keys()
92 wpabuf_free(wps->dh_privkey); in wps_derive_keys()
93 wps->dh_privkey = NULL; in wps_derive_keys()
105 addr[0] = wps->nonce_e; in wps_derive_keys()
107 addr[1] = wps->mac_addr_e; in wps_derive_keys()
109 addr[2] = wps->nonce_r; in wps_derive_keys()
116 os_memcpy(wps->authkey, keys, WPS_AUTHKEY_LEN); in wps_derive_keys()
[all …]
Dwps_attr_build.c24 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg) in wps_build_public_key() argument
29 pubkey = dh_init(dh_groups_get(WPS_DH_GROUP), &wps->dh_privkey); in wps_build_public_key()
41 if (wps->registrar) { in wps_build_public_key()
42 wpabuf_free(wps->dh_pubkey_r); in wps_build_public_key()
43 wps->dh_pubkey_r = pubkey; in wps_build_public_key()
45 wpabuf_free(wps->dh_pubkey_e); in wps_build_public_key()
46 wps->dh_pubkey_e = pubkey; in wps_build_public_key()
103 int wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg) in wps_build_authenticator() argument
109 if (wps->last_msg == NULL) { in wps_build_authenticator()
118 addr[0] = wpabuf_head(wps->last_msg); in wps_build_authenticator()
[all …]
Dwps_i.h30 struct wps_context *wps; member
181 int wps_derive_keys(struct wps_data *wps);
182 void wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd,
184 struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr,
186 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg);
187 void wps_success_event(struct wps_context *wps);
188 void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part);
189 void wps_pbc_overlap_event(struct wps_context *wps);
190 void wps_pbc_timeout_event(struct wps_context *wps);
196 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg);
[all …]
Dwps.c38 data->wps = cfg->wps; in wps_init()
41 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init()
43 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init()
44 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init()
105 wps_registrar_invalidate_pin(data->wps->registrar, in wps_deinit()
108 wps_registrar_unlock_pin(data->wps->registrar, data->uuid_e); in wps_deinit()
133 enum wps_process_res wps_process_msg(struct wps_data *wps, in wps_process_msg() argument
137 if (wps->registrar) in wps_process_msg()
138 return wps_registrar_process_msg(wps, op_code, msg); in wps_process_msg()
140 return wps_enrollee_process_msg(wps, op_code, msg); in wps_process_msg()
[all …]
Dwps_upnp_web.c544 s = sm->wps->friendly_name; in format_wps_device_xml()
548 s = sm->wps->dev.manufacturer; in format_wps_device_xml()
552 if (sm->wps->manufacturer_url) in format_wps_device_xml()
554 sm->wps->manufacturer_url); in format_wps_device_xml()
556 if (sm->wps->model_description) in format_wps_device_xml()
558 sm->wps->model_description); in format_wps_device_xml()
560 s = sm->wps->dev.model_name; in format_wps_device_xml()
564 if (sm->wps->dev.model_number) in format_wps_device_xml()
566 sm->wps->dev.model_number); in format_wps_device_xml()
568 if (sm->wps->model_url) in format_wps_device_xml()
[all …]
Dwps_attr_process.c22 int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator, in wps_process_authenticator() argument
35 if (wps->last_msg == NULL) { in wps_process_authenticator()
44 addr[0] = wpabuf_head(wps->last_msg); in wps_process_authenticator()
45 len[0] = wpabuf_len(wps->last_msg); in wps_process_authenticator()
48 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash); in wps_process_authenticator()
59 int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg, in wps_process_key_wrap_auth() argument
79 hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash); in wps_process_key_wrap_auth()
Dwps.h98 struct wps_context *wps; member
155 enum wps_process_res wps_process_msg(struct wps_data *wps,
159 struct wpabuf * wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code);
514 wps_registrar_init(struct wps_context *wps,
Dwps_upnp.h19 struct wps_data *wps; member
54 upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps,
Dwps_upnp.c1103 if (sm->peer.wps) in upnp_wps_device_deinit()
1104 wps_deinit(sm->peer.wps); in upnp_wps_device_deinit()
1120 upnp_wps_device_init(struct upnp_wps_device_ctx *ctx, struct wps_context *wps, in upnp_wps_device_init() argument
1132 sm->wps = wps; in upnp_wps_device_init()
Dwps_upnp_i.h126 struct wps_context *wps; member
/external/wpa_supplicant_6/wpa_supplicant/
Dwps_supplicant.c653 struct wps_context *wps; in wpas_wps_init() local
656 wps = os_zalloc(sizeof(*wps)); in wpas_wps_init()
657 if (wps == NULL) in wpas_wps_init()
660 wps->cred_cb = wpa_supplicant_wps_cred; in wpas_wps_init()
661 wps->event_cb = wpa_supplicant_wps_event; in wpas_wps_init()
662 wps->cb_ctx = wpa_s; in wpas_wps_init()
664 wps->dev.device_name = wpa_s->conf->device_name; in wpas_wps_init()
665 wps->dev.manufacturer = wpa_s->conf->manufacturer; in wpas_wps_init()
666 wps->dev.model_name = wpa_s->conf->model_name; in wpas_wps_init()
667 wps->dev.model_number = wpa_s->conf->model_number; in wpas_wps_init()
[all …]
Dscan.c50 int wps = 0; in wpas_wps_in_use() local
56 wps = 1; in wpas_wps_in_use()
65 return wps; in wpas_wps_in_use()
90 int wps = 0; in wpa_supplicant_scan() local
169 wps = wpas_wps_in_use(wpa_s->conf, &req_type); in wpa_supplicant_scan()
173 !wpa_s->use_client_mlme && wps != 2) { in wpa_supplicant_scan()
184 if (wps) { in wpa_supplicant_scan()
185 wps_ie = wps_build_probe_req_ie(wps == 2, &wpa_s->wps->dev, in wpa_supplicant_scan()
186 wpa_s->wps->uuid, req_type); in wpa_supplicant_scan()
DAndroid.mk59 INCLUDES += $(LOCAL_PATH)/src/wps
539 OBJS += src/wps/wps.c
540 OBJS += src/wps/wps_common.c
541 OBJS += src/wps/wps_attr_parse.c
542 OBJS += src/wps/wps_attr_build.c
543 OBJS += src/wps/wps_attr_process.c
544 OBJS += src/wps/wps_dev_attr.c
545 OBJS += src/wps/wps_enrollee.c
546 OBJS += src/wps/wps_registrar.c
557 OBJS += src/wps/wps_upnp.c
[all …]
DMakefile516 OBJS += ../src/wps/wps.o
517 OBJS += ../src/wps/wps_common.o
518 OBJS += ../src/wps/wps_attr_parse.o
519 OBJS += ../src/wps/wps_attr_build.o
520 OBJS += ../src/wps/wps_attr_process.o
521 OBJS += ../src/wps/wps_dev_attr.o
522 OBJS += ../src/wps/wps_enrollee.o
523 OBJS += ../src/wps/wps_registrar.o
534 OBJS += ../src/wps/wps_upnp.o
535 OBJS += ../src/wps/wps_upnp_ssdp.o
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/eap_peer/
Deap_wsc.c33 struct wps_data *wps; member
77 struct wps_context *wps; in eap_wsc_init() local
79 wps = sm->wps; in eap_wsc_init()
80 if (wps == NULL) { in eap_wsc_init()
104 data->wps_ctx = wps; in eap_wsc_init()
107 cfg.wps = wps; in eap_wsc_init()
138 data->wps = wps_init(&cfg); in eap_wsc_init()
139 if (data->wps == NULL) { in eap_wsc_init()
159 wps_deinit(data->wps); in eap_wsc_deinit()
397 res = wps_process_msg(data->wps, op_code, data->in_buf); in eap_wsc_process()
[all …]
Deap.h253 struct wps_context *wps; member
Deap_i.h335 struct wps_context *wps; member
/external/wpa_supplicant_6/wpa_supplicant/src/eap_server/
Deap_wsc.c32 struct wps_data *wps; member
109 cfg.wps = sm->wps; in eap_wsc_init()
112 if (sm->wps == NULL || sm->wps->registrar == NULL) { in eap_wsc_init()
129 data->wps = wps_init(&cfg); in eap_wsc_init()
130 if (data->wps == NULL) { in eap_wsc_init()
146 wps_deinit(data->wps); in eap_wsc_reset()
237 data->out_buf = wps_get_msg(data->wps, in eap_wsc_buildReq()
422 res = wps_process_msg(data->wps, op_code, data->in_buf); in eap_wsc_process()
Deap.h106 struct wps_context *wps; member
Deap_i.h184 struct wps_context *wps; member
/external/wpa_supplicant_6/wpa_supplicant/src/
DMakefile1 …rivers hlr_auc_gw eapol_supp eap_common eap_peer eap_server l2_packet radius rsn_supp tls utils wps
/external/wpa_supplicant_6/wpa_supplicant/src/radius/
Dradius_server.h36 struct wps_context *wps; member
Dradius_server.c96 struct wps_context *wps; member
328 eap_conf.wps = data->wps; in radius_server_get_new_session()
1072 data->wps = conf->wps; in radius_server_init()

12