/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/wps/ |
D | wps_enrollee.c | 19 static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg) in wps_build_wps_state() argument 22 if (wps->wps->ap) in wps_build_wps_state() 23 state = wps->wps->wps_state; in wps_build_wps_state() 35 static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg) in wps_build_e_hash() argument 41 if (random_get_bytes(wps->snonce, 2 * WPS_SECRET_NONCE_LEN) < 0) in wps_build_e_hash() 43 wpa_hexdump(MSG_DEBUG, "WPS: E-S1", wps->snonce, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 45 wps->snonce + WPS_SECRET_NONCE_LEN, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 47 if (wps->dh_pubkey_e == NULL || wps->dh_pubkey_r == NULL) { in wps_build_e_hash() 58 addr[0] = wps->snonce; in wps_build_e_hash() 60 addr[1] = wps->psk1; in wps_build_e_hash() [all …]
|
D | wps_registrar.c | 143 struct wps_context *wps; member 478 static int wps_build_wps_state(struct wps_context *wps, struct wpabuf *msg) in wps_build_wps_state() argument 481 wps->wps_state); in wps_build_wps_state() 484 wpabuf_put_u8(msg, wps->wps_state); in wps_build_wps_state() 490 static void wps_registrar_free_pending_m2(struct wps_context *wps) in wps_registrar_free_pending_m2() argument 493 p = wps->upnp_msgs; in wps_registrar_free_pending_m2() 497 wps->upnp_msgs = p->next; in wps_registrar_free_pending_m2() 514 static int wps_build_ap_setup_locked(struct wps_context *wps, in wps_build_ap_setup_locked() argument 517 if (wps->ap_setup_locked && wps->ap_setup_locked != 2) { in wps_build_ap_setup_locked() 566 return wps_build_uuid_e(msg, reg->wps->uuid); in wps_build_sel_pbc_reg_uuid_e() [all …]
|
D | wps_attr_build.c | 21 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg) in wps_build_public_key() argument 26 wpabuf_clear_free(wps->dh_privkey); in wps_build_public_key() 27 wps->dh_privkey = NULL; in wps_build_public_key() 28 if (wps->dev_pw_id != DEV_PW_DEFAULT && wps->wps->dh_privkey && in wps_build_public_key() 29 wps->wps->dh_ctx) { in wps_build_public_key() 31 if (wps->wps->dh_pubkey == NULL) { in wps_build_public_key() 36 wps->dh_privkey = wpabuf_dup(wps->wps->dh_privkey); in wps_build_public_key() 37 wps->dh_ctx = wps->wps->dh_ctx; in wps_build_public_key() 38 wps->wps->dh_ctx = NULL; in wps_build_public_key() 39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key() [all …]
|
D | wps_common.c | 62 int wps_derive_keys(struct wps_data *wps) in wps_derive_keys() argument 70 if (wps->dh_privkey == NULL) { in wps_derive_keys() 75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys() 81 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: DH Private Key", wps->dh_privkey); in wps_derive_keys() 83 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); in wps_derive_keys() 84 dh5_free(wps->dh_ctx); in wps_derive_keys() 85 wps->dh_ctx = NULL; in wps_derive_keys() 93 wpabuf_clear_free(wps->dh_privkey); in wps_derive_keys() 94 wps->dh_privkey = NULL; in wps_derive_keys() 106 addr[0] = wps->nonce_e; in wps_derive_keys() [all …]
|
D | wps_i.h | 27 struct wps_context *wps; member 136 int wps_derive_keys(struct wps_data *wps); 137 int wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd, 139 struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr, 141 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, 143 void wps_success_event(struct wps_context *wps, const u8 *mac_addr); 144 void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part, 146 void wps_pbc_overlap_event(struct wps_context *wps); 147 void wps_pbc_timeout_event(struct wps_context *wps); 148 void wps_pbc_active_event(struct wps_context *wps); [all …]
|
D | wps_er.c | 34 static void wps_er_sta_event(struct wps_context *wps, struct wps_er_sta *sta, in wps_er_sta_event() argument 40 if (wps->event_cb == NULL) in wps_er_sta_event() 55 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_sta_event() 76 wps_er_sta_event(sta->ap->er->wps, sta, WPS_EV_ER_ENROLLEE_REMOVE); in wps_er_sta_free() 77 if (sta->wps) in wps_er_sta_free() 78 wps_deinit(sta->wps); in wps_er_sta_free() 127 static void wps_er_ap_event(struct wps_context *wps, struct wps_er_ap *ap, in wps_er_ap_event() argument 133 if (wps->event_cb == NULL) in wps_er_ap_event() 150 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_ap_event() 340 wps_er_ap_event(er->wps, ap, WPS_EV_ER_AP_REMOVE); in wps_er_ap_remove_entry() [all …]
|
D | wps_upnp_web.c | 195 s = iface->wps->friendly_name; in format_wps_device_xml() 199 s = iface->wps->dev.manufacturer; in format_wps_device_xml() 203 if (iface->wps->manufacturer_url) in format_wps_device_xml() 205 iface->wps->manufacturer_url); in format_wps_device_xml() 207 if (iface->wps->model_description) in format_wps_device_xml() 209 iface->wps->model_description); in format_wps_device_xml() 211 s = iface->wps->dev.model_name; in format_wps_device_xml() 215 if (iface->wps->dev.model_number) in format_wps_device_xml() 217 iface->wps->dev.model_number); in format_wps_device_xml() 219 if (iface->wps->model_url) in format_wps_device_xml() [all …]
|
D | wps.c | 44 data->wps = cfg->wps; in wps_init() 47 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 49 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init() 50 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 69 if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) { in wps_init() 75 data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id; in wps_init() 77 os_memdup(wpabuf_head(cfg->wps->ap_nfc_dev_pw), in wps_init() 78 wpabuf_len(cfg->wps->ap_nfc_dev_pw)); in wps_init() 83 data->dev_password_len = wpabuf_len(cfg->wps->ap_nfc_dev_pw); in wps_init() 162 wps_registrar_remove_nfc_pw_token(data->wps->registrar, in wps_deinit() [all …]
|
D | wps_attr_process.c | 16 int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator, in wps_process_authenticator() argument 29 if (wps->last_msg == NULL) { in wps_process_authenticator() 38 addr[0] = wpabuf_head(wps->last_msg); in wps_process_authenticator() 39 len[0] = wpabuf_len(wps->last_msg); in wps_process_authenticator() 43 if (hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, in wps_process_authenticator() 54 int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg, in wps_process_key_wrap_auth() argument 74 if (hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash) < 0 || in wps_process_key_wrap_auth()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/ |
D | wps_enrollee.c | 19 static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg) in wps_build_wps_state() argument 22 if (wps->wps->ap) in wps_build_wps_state() 23 state = wps->wps->wps_state; in wps_build_wps_state() 35 static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg) in wps_build_e_hash() argument 41 if (random_get_bytes(wps->snonce, 2 * WPS_SECRET_NONCE_LEN) < 0) in wps_build_e_hash() 43 wpa_hexdump(MSG_DEBUG, "WPS: E-S1", wps->snonce, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 45 wps->snonce + WPS_SECRET_NONCE_LEN, WPS_SECRET_NONCE_LEN); in wps_build_e_hash() 47 if (wps->dh_pubkey_e == NULL || wps->dh_pubkey_r == NULL) { in wps_build_e_hash() 58 addr[0] = wps->snonce; in wps_build_e_hash() 60 addr[1] = wps->psk1; in wps_build_e_hash() [all …]
|
D | wps_registrar.c | 142 struct wps_context *wps; member 477 static int wps_build_wps_state(struct wps_context *wps, struct wpabuf *msg) in wps_build_wps_state() argument 480 wps->wps_state); in wps_build_wps_state() 483 wpabuf_put_u8(msg, wps->wps_state); in wps_build_wps_state() 489 static void wps_registrar_free_pending_m2(struct wps_context *wps) in wps_registrar_free_pending_m2() argument 492 p = wps->upnp_msgs; in wps_registrar_free_pending_m2() 496 wps->upnp_msgs = p->next; in wps_registrar_free_pending_m2() 513 static int wps_build_ap_setup_locked(struct wps_context *wps, in wps_build_ap_setup_locked() argument 516 if (wps->ap_setup_locked && wps->ap_setup_locked != 2) { in wps_build_ap_setup_locked() 565 return wps_build_uuid_e(msg, reg->wps->uuid); in wps_build_sel_pbc_reg_uuid_e() [all …]
|
D | wps_attr_build.c | 21 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg) in wps_build_public_key() argument 26 wpabuf_clear_free(wps->dh_privkey); in wps_build_public_key() 27 wps->dh_privkey = NULL; in wps_build_public_key() 28 if (wps->dev_pw_id != DEV_PW_DEFAULT && wps->wps->dh_privkey && in wps_build_public_key() 29 wps->wps->dh_ctx) { in wps_build_public_key() 31 if (wps->wps->dh_pubkey == NULL) { in wps_build_public_key() 36 wps->dh_privkey = wpabuf_dup(wps->wps->dh_privkey); in wps_build_public_key() 37 wps->dh_ctx = wps->wps->dh_ctx; in wps_build_public_key() 38 wps->wps->dh_ctx = NULL; in wps_build_public_key() 39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key() [all …]
|
D | wps_common.c | 62 int wps_derive_keys(struct wps_data *wps) in wps_derive_keys() argument 70 if (wps->dh_privkey == NULL) { in wps_derive_keys() 75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys() 81 wpa_hexdump_buf_key(MSG_DEBUG, "WPS: DH Private Key", wps->dh_privkey); in wps_derive_keys() 83 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); in wps_derive_keys() 84 dh5_free(wps->dh_ctx); in wps_derive_keys() 85 wps->dh_ctx = NULL; in wps_derive_keys() 93 wpabuf_clear_free(wps->dh_privkey); in wps_derive_keys() 94 wps->dh_privkey = NULL; in wps_derive_keys() 106 addr[0] = wps->nonce_e; in wps_derive_keys() [all …]
|
D | wps_i.h | 27 struct wps_context *wps; member 136 int wps_derive_keys(struct wps_data *wps); 137 int wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd, 139 struct wpabuf * wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr, 141 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, 143 void wps_success_event(struct wps_context *wps, const u8 *mac_addr); 144 void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part, 146 void wps_pbc_overlap_event(struct wps_context *wps); 147 void wps_pbc_timeout_event(struct wps_context *wps); 148 void wps_pbc_active_event(struct wps_context *wps); [all …]
|
D | wps_er.c | 34 static void wps_er_sta_event(struct wps_context *wps, struct wps_er_sta *sta, in wps_er_sta_event() argument 40 if (wps->event_cb == NULL) in wps_er_sta_event() 55 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_sta_event() 76 wps_er_sta_event(sta->ap->er->wps, sta, WPS_EV_ER_ENROLLEE_REMOVE); in wps_er_sta_free() 77 if (sta->wps) in wps_er_sta_free() 78 wps_deinit(sta->wps); in wps_er_sta_free() 127 static void wps_er_ap_event(struct wps_context *wps, struct wps_er_ap *ap, in wps_er_ap_event() argument 133 if (wps->event_cb == NULL) in wps_er_ap_event() 150 wps->event_cb(wps->cb_ctx, event, &data); in wps_er_ap_event() 340 wps_er_ap_event(er->wps, ap, WPS_EV_ER_AP_REMOVE); in wps_er_ap_remove_entry() [all …]
|
D | wps_upnp_web.c | 195 s = iface->wps->friendly_name; in format_wps_device_xml() 199 s = iface->wps->dev.manufacturer; in format_wps_device_xml() 203 if (iface->wps->manufacturer_url) in format_wps_device_xml() 205 iface->wps->manufacturer_url); in format_wps_device_xml() 207 if (iface->wps->model_description) in format_wps_device_xml() 209 iface->wps->model_description); in format_wps_device_xml() 211 s = iface->wps->dev.model_name; in format_wps_device_xml() 215 if (iface->wps->dev.model_number) in format_wps_device_xml() 217 iface->wps->dev.model_number); in format_wps_device_xml() 219 if (iface->wps->model_url) in format_wps_device_xml() [all …]
|
D | wps.c | 44 data->wps = cfg->wps; in wps_init() 47 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 49 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init() 50 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 69 if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) { in wps_init() 75 data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id; in wps_init() 77 os_memdup(wpabuf_head(cfg->wps->ap_nfc_dev_pw), in wps_init() 78 wpabuf_len(cfg->wps->ap_nfc_dev_pw)); in wps_init() 83 data->dev_password_len = wpabuf_len(cfg->wps->ap_nfc_dev_pw); in wps_init() 162 wps_registrar_remove_nfc_pw_token(data->wps->registrar, in wps_deinit() [all …]
|
D | wps_attr_process.c | 16 int wps_process_authenticator(struct wps_data *wps, const u8 *authenticator, in wps_process_authenticator() argument 29 if (wps->last_msg == NULL) { in wps_process_authenticator() 38 addr[0] = wpabuf_head(wps->last_msg); in wps_process_authenticator() 39 len[0] = wpabuf_len(wps->last_msg); in wps_process_authenticator() 42 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash); in wps_process_authenticator() 53 int wps_process_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg, in wps_process_key_wrap_auth() argument 73 hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash); in wps_process_key_wrap_auth()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
D | wps_hostapd.c | 34 struct wps_context *wps); 43 static void hostapd_wps_nfc_clear(struct wps_context *wps); 128 p->wps = 1; in hostapd_wps_new_psk_cb() 222 if (hapd != data->current_hapd && hapd->wps != NULL) in wps_stop_registrar() 223 wps_registrar_complete(hapd->wps->registrar, data->uuid_e, in wps_stop_registrar() 284 if (!wpa_psk->wps) in hostapd_wps_lookup_pskfile_cb() 466 if (hapd->wps == NULL) in hapd_wps_cred_cb() 500 os_memcpy(hapd->wps->ssid, cred->ssid, cred->ssid_len); in hapd_wps_cred_cb() 501 hapd->wps->ssid_len = cred->ssid_len; in hapd_wps_cred_cb() 502 hapd->wps->encr_types = cred->encr_type; in hapd_wps_cred_cb() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
D | wps_hostapd.c | 34 struct wps_context *wps); 43 static void hostapd_wps_nfc_clear(struct wps_context *wps); 220 if (hapd != data->current_hapd && hapd->wps != NULL) in wps_stop_registrar() 221 wps_registrar_complete(hapd->wps->registrar, data->uuid_e, in wps_stop_registrar() 418 if (hapd->wps == NULL) in hapd_wps_cred_cb() 452 os_memcpy(hapd->wps->ssid, cred->ssid, cred->ssid_len); in hapd_wps_cred_cb() 453 hapd->wps->ssid_len = cred->ssid_len; in hapd_wps_cred_cb() 454 hapd->wps->encr_types = cred->encr_type; in hapd_wps_cred_cb() 455 hapd->wps->encr_types_rsn = cred->encr_type; in hapd_wps_cred_cb() 456 hapd->wps->encr_types_wpa = cred->encr_type; in hapd_wps_cred_cb() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant/ |
D | wps_supplicant.c | 141 struct wpabuf *wps; in wpas_wps_eapol_cb() local 144 wps = wpa_bss_get_vendor_ie_multi(bss, in wpas_wps_eapol_cb() 146 if (wps && wps_parse_msg(wps, &attr) == 0 && in wpas_wps_eapol_cb() 150 wpabuf_free(wps); in wpas_wps_eapol_cb() 1516 struct wps_context *wps) in wpas_wps_set_uuid() argument 1527 if (wps != wpa_s->global->ifaces->wps) in wpas_wps_set_uuid() 1528 os_memcpy(wps->uuid, in wpas_wps_set_uuid() 1529 wpa_s->global->ifaces->wps->uuid, in wpas_wps_set_uuid() 1533 uuid_random(wps->uuid); in wpas_wps_set_uuid() 1536 uuid_gen_mac_addr(wpa_s->own_addr, wps->uuid); in wpas_wps_set_uuid() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/wpa_supplicant/ |
D | wps_supplicant.c | 141 struct wpabuf *wps; in wpas_wps_eapol_cb() local 144 wps = wpa_bss_get_vendor_ie_multi(bss, in wpas_wps_eapol_cb() 146 if (wps && wps_parse_msg(wps, &attr) == 0 && in wpas_wps_eapol_cb() 150 wpabuf_free(wps); in wpas_wps_eapol_cb() 1493 struct wps_context *wps) in wpas_wps_set_uuid() argument 1504 if (wps != wpa_s->global->ifaces->wps) in wpas_wps_set_uuid() 1505 os_memcpy(wps->uuid, in wpas_wps_set_uuid() 1506 wpa_s->global->ifaces->wps->uuid, in wpas_wps_set_uuid() 1510 uuid_random(wps->uuid); in wpas_wps_set_uuid() 1513 uuid_gen_mac_addr(wpa_s->own_addr, wps->uuid); in wpas_wps_set_uuid() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/ |
D | CMakeLists.txt | 26 include_directories(src/wps) 80 hostapd/wps-ap-nfc.py 668 src/wps/http.h 669 src/wps/http_client.c 670 src/wps/http_client.h 671 src/wps/http_server.c 672 src/wps/http_server.h 673 src/wps/httpread.c 674 src/wps/httpread.h 675 src/wps/Makefile [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
D | eap_server_wsc.c | 27 struct wps_data *wps; member 106 cfg.wps = sm->cfg->wps; in eap_wsc_init() 109 if (!sm->cfg->wps || !sm->cfg->wps->registrar) { in eap_wsc_init() 135 if (!sm->cfg->wps->use_passphrase) { in eap_wsc_init() 144 data->wps = wps_init(&cfg); in eap_wsc_init() 145 if (data->wps == NULL) { in eap_wsc_init() 162 wps_deinit(data->wps); in eap_wsc_reset() 253 data->out_buf = wps_get_msg(data->wps, in eap_wsc_buildReq() 438 res = wps_process_msg(data->wps, op_code, data->in_buf); in eap_wsc_process()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/ |
D | eap_wsc.c | 27 struct wps_data *wps; member 147 struct wps_context *wps; in eap_wsc_init() local 153 wps = sm->wps; in eap_wsc_init() 154 if (wps == NULL) { in eap_wsc_init() 178 data->wps_ctx = wps; in eap_wsc_init() 181 cfg.wps = wps; in eap_wsc_init() 261 data->wps = wps_init(&cfg); in eap_wsc_init() 262 if (data->wps == NULL) { in eap_wsc_init() 293 wps_deinit(data->wps); in eap_wsc_deinit() 532 res = wps_process_msg(data->wps, op_code, data->in_buf); in eap_wsc_process() [all …]
|