/third_party/wpa_supplicant/wpa_supplicant-2.9/src/wps/ |
H A 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 in wps_build_e_hash() 83 wps_build_e_snonce1(struct wps_data *wps, struct wpabuf *msg) wps_build_e_snonce1() argument 93 wps_build_e_snonce2(struct wps_data *wps, struct wpabuf *msg) wps_build_e_snonce2() argument 104 wps_build_m1(struct wps_data *wps) wps_build_m1() argument 170 wps_build_m3(struct wps_data *wps) wps_build_m3() argument 208 wps_build_m5(struct wps_data *wps) wps_build_m5() argument 243 wps_build_cred_ssid(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_ssid() argument 253 wps_build_cred_auth_type(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_auth_type() argument 277 wps_build_cred_encr_type(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_encr_type() argument 301 wps_build_cred_network_key(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_network_key() argument 339 wps_build_cred_mac_addr(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_mac_addr() argument 349 wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) wps_build_ap_settings() argument 377 wps_build_m7(struct wps_data *wps) wps_build_m7() argument 423 wps_build_wsc_done(struct wps_data *wps) wps_build_wsc_done() argument 452 wps_enrollee_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_enrollee_get_msg() argument 513 wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce) wps_process_registrar_nonce() argument 528 wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce) wps_process_enrollee_nonce() argument 544 wps_process_uuid_r(struct wps_data *wps, const u8 *uuid_r) wps_process_uuid_r() argument 558 wps_process_pubkey(struct wps_data *wps, const u8 *pk, size_t pk_len) wps_process_pubkey() argument 596 wps_process_r_hash1(struct wps_data *wps, const u8 *r_hash1) wps_process_r_hash1() argument 610 wps_process_r_hash2(struct wps_data *wps, const u8 *r_hash2) wps_process_r_hash2() argument 624 wps_process_r_snonce1(struct wps_data *wps, const u8 *r_snonce1) wps_process_r_snonce1() argument 664 wps_process_r_snonce2(struct wps_data *wps, const u8 *r_snonce2) wps_process_r_snonce2() argument 704 wps_process_cred_e(struct wps_data *wps, const u8 *cred, size_t cred_len, int wps2) wps_process_cred_e() argument 766 wps_process_creds(struct wps_data *wps, const u8 *cred[], u16 cred_len[], unsigned int num_cred, int wps2) wps_process_creds() argument 802 wps_process_ap_settings_e(struct wps_data *wps, struct wps_parse_attr *attr, struct wpabuf *attrs, int wps2) wps_process_ap_settings_e() argument 893 wps_process_dev_pw_id(struct wps_data *wps, const u8 *dev_pw_id) wps_process_dev_pw_id() argument 950 wps_process_m2(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m2() argument 1031 wps_process_m2d(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_m2d() argument 1086 wps_process_m4(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m4() argument 1141 wps_process_m6(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m6() argument 1198 wps_process_m8(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m8() argument 1268 wps_process_wsc_msg(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_msg() argument 1353 wps_process_wsc_ack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_ack() argument 1399 wps_process_wsc_nack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_nack() argument 1477 wps_enrollee_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_enrollee_process_msg() argument [all...] |
H A 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 in wps_build_ap_setup_locked() 668 wps_registrar_init(struct wps_context *wps, const struct wps_registrar_config *cfg) wps_registrar_init() argument 1405 wps_get_dev_password(struct wps_data *wps) wps_get_dev_password() argument 1467 wps_build_uuid_r(struct wps_data *wps, struct wpabuf *msg) wps_build_uuid_r() argument 1477 wps_build_r_hash(struct wps_data *wps, struct wpabuf *msg) wps_build_r_hash() argument 1525 wps_build_r_snonce1(struct wps_data *wps, struct wpabuf *msg) wps_build_r_snonce1() argument 1535 wps_build_r_snonce2(struct wps_data *wps, struct wpabuf *msg) wps_build_r_snonce2() argument 1641 wps_build_cred(struct wps_data *wps, struct wpabuf *msg) wps_build_cred() argument 1847 wps_build_ap_settings(struct wps_data *wps, struct wpabuf *msg) wps_build_ap_settings() argument 1858 wps_build_ap_cred(struct wps_data *wps) wps_build_ap_cred() argument 1887 wps_build_m2(struct wps_data *wps) wps_build_m2() argument 1960 wps_build_m2d(struct wps_data *wps) wps_build_m2d() argument 1999 wps_build_m4(struct wps_data *wps) wps_build_m4() argument 2038 wps_build_m6(struct wps_data *wps) wps_build_m6() argument 2074 wps_build_m8(struct wps_data *wps) wps_build_m8() argument 2110 wps_registrar_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_registrar_get_msg() argument 2208 wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce) wps_process_enrollee_nonce() argument 2223 wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce) wps_process_registrar_nonce() argument 2239 wps_process_uuid_e(struct wps_data *wps, const u8 *uuid_e) wps_process_uuid_e() argument 2253 wps_process_dev_password_id(struct wps_data *wps, const u8 *pw_id) wps_process_dev_password_id() argument 2267 wps_process_e_hash1(struct wps_data *wps, const u8 *e_hash1) wps_process_e_hash1() argument 2281 wps_process_e_hash2(struct wps_data *wps, const u8 *e_hash2) wps_process_e_hash2() argument 2295 wps_process_e_snonce1(struct wps_data *wps, const u8 *e_snonce1) wps_process_e_snonce1() argument 2335 wps_process_e_snonce2(struct wps_data *wps, const u8 *e_snonce2) wps_process_e_snonce2() argument 2385 wps_process_mac_addr(struct wps_data *wps, const u8 *mac_addr) wps_process_mac_addr() argument 2401 wps_process_pubkey(struct wps_data *wps, const u8 *pk, size_t pk_len) wps_process_pubkey() argument 2418 wps_process_auth_type_flags(struct wps_data *wps, const u8 *auth) wps_process_auth_type_flags() argument 2475 wps_process_encr_type_flags(struct wps_data *wps, const u8 *encr) wps_process_encr_type_flags() argument 2515 wps_process_conn_type_flags(struct wps_data *wps, const u8 *conn) wps_process_conn_type_flags() argument 2530 wps_process_config_methods(struct wps_data *wps, const u8 *methods) wps_process_config_methods() argument 2568 wps_process_wps_state(struct wps_data *wps, const u8 *state) wps_process_wps_state() argument 2583 wps_process_assoc_state(struct wps_data *wps, const u8 *assoc) wps_process_assoc_state() argument 2599 wps_process_config_error(struct wps_data *wps, const u8 *err) wps_process_config_error() argument 2615 wps_registrar_p2p_dev_addr_match(struct wps_data *wps) wps_registrar_p2p_dev_addr_match() argument 2636 wps_registrar_skip_overlap(struct wps_data *wps) wps_registrar_skip_overlap() argument 2654 wps_process_m1(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_m1() argument 2788 wps_process_m3(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m3() argument 2823 wps_process_m5(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m5() argument 2885 wps_sta_cred_cb(struct wps_data *wps) wps_sta_cred_cb() argument 2920 wps_process_ap_settings_r(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_ap_settings_r() argument 2974 wps_process_m7(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m7() argument 3039 wps_process_wsc_msg(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_msg() argument 3122 wps_process_wsc_ack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_ack() argument 3189 wps_process_wsc_nack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_nack() argument 3271 wps_process_wsc_done(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_done() argument 3396 wps_registrar_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_registrar_process_msg() argument [all...] |
H A 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 in wps_build_public_key() 159 wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg) wps_build_authenticator() argument 284 wps_build_enrollee_nonce(struct wps_data *wps, struct wpabuf *msg) wps_build_enrollee_nonce() argument 294 wps_build_registrar_nonce(struct wps_data *wps, struct wpabuf *msg) wps_build_registrar_nonce() argument 304 wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_auth_type_flags() argument 328 wps_build_encr_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_encr_type_flags() argument 349 wps_build_conn_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_conn_type_flags() argument 359 wps_build_assoc_state(struct wps_data *wps, struct wpabuf *msg) wps_build_assoc_state() argument 369 wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg) wps_build_key_wrap_auth() argument 384 wps_build_encr_settings(struct wps_data *wps, struct wpabuf *msg, struct wpabuf *plain) wps_build_encr_settings() argument [all...] |
H A 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 in wps_derive_keys() 132 wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd, size_t dev_passwd_len) wps_derive_psk() argument 155 wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr, size_t encr_len) wps_decrypt_encr_settings() argument 272 wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, u16 config_error, u16 error_indication, const u8 *mac_addr) wps_fail_event() argument 289 wps_success_event(struct wps_context *wps, const u8 *mac_addr) wps_success_event() argument 302 wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part, const u8 *mac_addr) wps_pwd_auth_fail_event() argument 318 wps_pbc_overlap_event(struct wps_context *wps) wps_pbc_overlap_event() argument 327 wps_pbc_timeout_event(struct wps_context *wps) wps_pbc_timeout_event() argument 336 wps_pbc_active_event(struct wps_context *wps) wps_pbc_active_event() argument 345 wps_pbc_disable_event(struct wps_context *wps) wps_pbc_disable_event() argument 356 wps_get_oob_cred(struct wps_context *wps, int rf_band, int channel) wps_get_oob_cred() argument 435 wps_oob_use_cred(struct wps_context *wps, struct wps_parse_attr *attr) wps_oob_use_cred() argument 575 wps_build_wsc_ack(struct wps_data *wps) wps_build_wsc_ack() argument 598 wps_build_wsc_nack(struct wps_data *wps) wps_build_wsc_nack() argument 740 wps_build_ssid(struct wpabuf *msg, struct wps_context *wps) wps_build_ssid() argument [all...] |
H A D | wps_i.h | 12 #include "wps.h" 25 * wps - Pointer to long term WPS context 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); [all...] |
H A 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 in wps_er_ap_event() 1249 wps_er_init(struct wps_context *wps, const char *ifname, const char *filter) wps_er_init() argument 2037 wps_er_config_token_from_cred(struct wps_context *wps, struct wps_credential *cred) wps_er_config_token_from_cred() argument 2081 wps_er_nfc_handover_sel(struct wps_er *er, struct wps_context *wps, const u8 *uuid, const u8 *addr, struct wpabuf *pubkey) wps_er_nfc_handover_sel() argument [all...] |
H A 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 in format_wps_device_xml() [all...] |
H A 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 in wps_init() 201 wps_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_process_msg() argument 221 wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_get_msg() argument [all...] |
H A 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/wps/ |
H A 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 in wps_build_e_hash() 83 wps_build_e_snonce1(struct wps_data *wps, struct wpabuf *msg) wps_build_e_snonce1() argument 93 wps_build_e_snonce2(struct wps_data *wps, struct wpabuf *msg) wps_build_e_snonce2() argument 104 wps_build_m1(struct wps_data *wps) wps_build_m1() argument 170 wps_build_m3(struct wps_data *wps) wps_build_m3() argument 208 wps_build_m5(struct wps_data *wps) wps_build_m5() argument 243 wps_build_cred_ssid(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_ssid() argument 253 wps_build_cred_auth_type(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_auth_type() argument 277 wps_build_cred_encr_type(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_encr_type() argument 301 wps_build_cred_network_key(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_network_key() argument 339 wps_build_cred_mac_addr(struct wps_data *wps, struct wpabuf *msg) wps_build_cred_mac_addr() argument 349 wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) wps_build_ap_settings() argument 377 wps_build_m7(struct wps_data *wps) wps_build_m7() argument 423 wps_build_wsc_done(struct wps_data *wps) wps_build_wsc_done() argument 452 wps_enrollee_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_enrollee_get_msg() argument 513 wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce) wps_process_registrar_nonce() argument 528 wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce) wps_process_enrollee_nonce() argument 544 wps_process_uuid_r(struct wps_data *wps, const u8 *uuid_r) wps_process_uuid_r() argument 558 wps_process_pubkey(struct wps_data *wps, const u8 *pk, size_t pk_len) wps_process_pubkey() argument 596 wps_process_r_hash1(struct wps_data *wps, const u8 *r_hash1) wps_process_r_hash1() argument 610 wps_process_r_hash2(struct wps_data *wps, const u8 *r_hash2) wps_process_r_hash2() argument 624 wps_process_r_snonce1(struct wps_data *wps, const u8 *r_snonce1) wps_process_r_snonce1() argument 664 wps_process_r_snonce2(struct wps_data *wps, const u8 *r_snonce2) wps_process_r_snonce2() argument 704 wps_process_cred_e(struct wps_data *wps, const u8 *cred, size_t cred_len, int wps2) wps_process_cred_e() argument 766 wps_process_creds(struct wps_data *wps, const u8 *cred[], u16 cred_len[], unsigned int num_cred, int wps2) wps_process_creds() argument 802 wps_process_ap_settings_e(struct wps_data *wps, struct wps_parse_attr *attr, struct wpabuf *attrs, int wps2) wps_process_ap_settings_e() argument 904 wps_process_dev_pw_id(struct wps_data *wps, const u8 *dev_pw_id) wps_process_dev_pw_id() argument 961 wps_process_m2(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m2() argument 1042 wps_process_m2d(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_m2d() argument 1097 wps_process_m4(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m4() argument 1152 wps_process_m6(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m6() argument 1209 wps_process_m8(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m8() argument 1279 wps_process_wsc_msg(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_msg() argument 1364 wps_process_wsc_ack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_ack() argument 1410 wps_process_wsc_nack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_nack() argument 1488 wps_enrollee_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_enrollee_process_msg() argument [all...] |
H A 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 in wps_build_ap_setup_locked() 669 wps_registrar_init(struct wps_context *wps, const struct wps_registrar_config *cfg) wps_registrar_init() argument 1383 wps_get_dev_password(struct wps_data *wps) wps_get_dev_password() argument 1445 wps_build_uuid_r(struct wps_data *wps, struct wpabuf *msg) wps_build_uuid_r() argument 1455 wps_build_r_hash(struct wps_data *wps, struct wpabuf *msg) wps_build_r_hash() argument 1503 wps_build_r_snonce1(struct wps_data *wps, struct wpabuf *msg) wps_build_r_snonce1() argument 1513 wps_build_r_snonce2(struct wps_data *wps, struct wpabuf *msg) wps_build_r_snonce2() argument 1619 wps_build_cred(struct wps_data *wps, struct wpabuf *msg) wps_build_cred() argument 1838 wps_build_ap_settings(struct wps_data *wps, struct wpabuf *msg) wps_build_ap_settings() argument 1849 wps_build_ap_cred(struct wps_data *wps) wps_build_ap_cred() argument 1878 wps_build_m2(struct wps_data *wps) wps_build_m2() argument 1951 wps_build_m2d(struct wps_data *wps) wps_build_m2d() argument 1990 wps_build_m4(struct wps_data *wps) wps_build_m4() argument 2029 wps_build_m6(struct wps_data *wps) wps_build_m6() argument 2065 wps_build_m8(struct wps_data *wps) wps_build_m8() argument 2101 wps_registrar_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_registrar_get_msg() argument 2199 wps_process_enrollee_nonce(struct wps_data *wps, const u8 *e_nonce) wps_process_enrollee_nonce() argument 2214 wps_process_registrar_nonce(struct wps_data *wps, const u8 *r_nonce) wps_process_registrar_nonce() argument 2230 wps_process_uuid_e(struct wps_data *wps, const u8 *uuid_e) wps_process_uuid_e() argument 2244 wps_process_dev_password_id(struct wps_data *wps, const u8 *pw_id) wps_process_dev_password_id() argument 2258 wps_process_e_hash1(struct wps_data *wps, const u8 *e_hash1) wps_process_e_hash1() argument 2272 wps_process_e_hash2(struct wps_data *wps, const u8 *e_hash2) wps_process_e_hash2() argument 2286 wps_process_e_snonce1(struct wps_data *wps, const u8 *e_snonce1) wps_process_e_snonce1() argument 2326 wps_process_e_snonce2(struct wps_data *wps, const u8 *e_snonce2) wps_process_e_snonce2() argument 2376 wps_process_mac_addr(struct wps_data *wps, const u8 *mac_addr) wps_process_mac_addr() argument 2392 wps_process_pubkey(struct wps_data *wps, const u8 *pk, size_t pk_len) wps_process_pubkey() argument 2409 wps_process_auth_type_flags(struct wps_data *wps, const u8 *auth) wps_process_auth_type_flags() argument 2466 wps_process_encr_type_flags(struct wps_data *wps, const u8 *encr) wps_process_encr_type_flags() argument 2506 wps_process_conn_type_flags(struct wps_data *wps, const u8 *conn) wps_process_conn_type_flags() argument 2521 wps_process_config_methods(struct wps_data *wps, const u8 *methods) wps_process_config_methods() argument 2559 wps_process_wps_state(struct wps_data *wps, const u8 *state) wps_process_wps_state() argument 2574 wps_process_assoc_state(struct wps_data *wps, const u8 *assoc) wps_process_assoc_state() argument 2590 wps_process_config_error(struct wps_data *wps, const u8 *err) wps_process_config_error() argument 2606 wps_registrar_p2p_dev_addr_match(struct wps_data *wps) wps_registrar_p2p_dev_addr_match() argument 2627 wps_registrar_skip_overlap(struct wps_data *wps) wps_registrar_skip_overlap() argument 2645 wps_process_m1(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_m1() argument 2779 wps_process_m3(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m3() argument 2814 wps_process_m5(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m5() argument 2876 wps_sta_cred_cb(struct wps_data *wps) wps_sta_cred_cb() argument 2911 wps_process_ap_settings_r(struct wps_data *wps, struct wps_parse_attr *attr) wps_process_ap_settings_r() argument 2965 wps_process_m7(struct wps_data *wps, const struct wpabuf *msg, struct wps_parse_attr *attr) wps_process_m7() argument 3030 wps_process_wsc_msg(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_msg() argument 3113 wps_process_wsc_ack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_ack() argument 3180 wps_process_wsc_nack(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_nack() argument 3262 wps_process_wsc_done(struct wps_data *wps, const struct wpabuf *msg) wps_process_wsc_done() argument 3387 wps_registrar_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_registrar_process_msg() argument [all...] |
H A 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 in wps_build_public_key() 159 wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg) wps_build_authenticator() argument 286 wps_build_enrollee_nonce(struct wps_data *wps, struct wpabuf *msg) wps_build_enrollee_nonce() argument 296 wps_build_registrar_nonce(struct wps_data *wps, struct wpabuf *msg) wps_build_registrar_nonce() argument 306 wps_build_auth_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_auth_type_flags() argument 333 wps_build_encr_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_encr_type_flags() argument 357 wps_build_conn_type_flags(struct wps_data *wps, struct wpabuf *msg) wps_build_conn_type_flags() argument 367 wps_build_assoc_state(struct wps_data *wps, struct wpabuf *msg) wps_build_assoc_state() argument 377 wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg) wps_build_key_wrap_auth() argument 393 wps_build_encr_settings(struct wps_data *wps, struct wpabuf *msg, struct wpabuf *plain) wps_build_encr_settings() argument [all...] |
H A 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 in wps_derive_keys() 132 wps_derive_psk(struct wps_data *wps, const u8 *dev_passwd, size_t dev_passwd_len) wps_derive_psk() argument 155 wps_decrypt_encr_settings(struct wps_data *wps, const u8 *encr, size_t encr_len) wps_decrypt_encr_settings() argument 272 wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, u16 config_error, u16 error_indication, const u8 *mac_addr) wps_fail_event() argument 289 wps_success_event(struct wps_context *wps, const u8 *mac_addr) wps_success_event() argument 302 wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part, const u8 *mac_addr) wps_pwd_auth_fail_event() argument 318 wps_pbc_overlap_event(struct wps_context *wps) wps_pbc_overlap_event() argument 327 wps_pbc_timeout_event(struct wps_context *wps) wps_pbc_timeout_event() argument 336 wps_pbc_active_event(struct wps_context *wps) wps_pbc_active_event() argument 345 wps_pbc_disable_event(struct wps_context *wps) wps_pbc_disable_event() argument 356 wps_get_oob_cred(struct wps_context *wps, int rf_band, int channel) wps_get_oob_cred() argument 435 wps_oob_use_cred(struct wps_context *wps, struct wps_parse_attr *attr) wps_oob_use_cred() argument 575 wps_build_wsc_ack(struct wps_data *wps) wps_build_wsc_ack() argument 598 wps_build_wsc_nack(struct wps_data *wps) wps_build_wsc_nack() argument 740 wps_build_ssid(struct wpabuf *msg, struct wps_context *wps) wps_build_ssid() argument [all...] |
H A D | wps_i.h | 12 #include "wps.h" 25 * wps - Pointer to long term WPS context 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); [all...] |
H A 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 in wps_er_ap_event() 1249 wps_er_init(struct wps_context *wps, const char *ifname, const char *filter) wps_er_init() argument 2037 wps_er_config_token_from_cred(struct wps_context *wps, struct wps_credential *cred) wps_er_config_token_from_cred() argument 2081 wps_er_nfc_handover_sel(struct wps_er *er, struct wps_context *wps, const u8 *uuid, const u8 *addr, struct wpabuf *pubkey) wps_er_nfc_handover_sel() argument [all...] |
H A 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 in format_wps_device_xml() [all...] |
H A D | wps.c | 43 data->wps = cfg->wps; in wps_init() 46 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 48 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN); in wps_init() 49 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN); in wps_init() 68 if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) { in wps_init() 74 data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id; in wps_init() 76 os_memdup(wpabuf_head(cfg->wps->ap_nfc_dev_pw), in wps_init() 77 wpabuf_len(cfg->wps in wps_init() 188 wps_check_msg_done(struct wps_data *wps) wps_check_msg_done() argument 207 wps_process_msg(struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg) wps_process_msg() argument 227 wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code) wps_get_msg() argument [all...] |
H A 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_standard/src/ap/ |
H A D | wps_hostapd.c | 19 #include "wps/wps.h" 20 #include "wps/wps_defs.h" 21 #include "wps/wps_dev_attr.h" 22 #include "wps/wps_attr_parse.h" 32 #include "wps/wps_upnp.h" 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() 151 fprintf(f, "wps in hostapd_wps_new_psk_cb() 1025 hostapd_wps_set_vendor_ext(struct hostapd_data *hapd, struct wps_context *wps) hostapd_wps_set_vendor_ext() argument 1050 hostapd_wps_set_application_ext(struct hostapd_data *hapd, struct wps_context *wps) hostapd_wps_set_application_ext() argument 1065 hostapd_free_wps(struct wps_context *wps) hostapd_free_wps() argument 1083 struct wps_context *wps; hostapd_init_wps() local 1352 struct wps_context *wps = hapd->wps; hostapd_init_wps_complete() local 1371 hostapd_wps_nfc_clear(struct wps_context *wps) hostapd_wps_nfc_clear() argument 1450 struct wps_context *wps = hapd->wps; hostapd_update_wps() local 1761 hostapd_wps_upnp_init(struct hostapd_data *hapd, struct wps_context *wps) hostapd_wps_upnp_init() argument 2015 hostapd_wps_nfc_tag_process(struct hostapd_data *hapd, const struct wpabuf *wps) hostapd_wps_nfc_tag_process() argument 2038 const struct wpabuf *wps = data; hostapd_wps_nfc_tag_read() local 2092 struct wps_context *wps = hapd->wps; hostapd_wps_nfc_hs_cr() local 2129 struct wpabuf *wps; hostapd_wps_nfc_report_handover() local 2237 struct wps_context *wps = hapd->wps; hostapd_wps_nfc_token_enable() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
H A D | wps_hostapd.c | 19 #include "wps/wps.h" 20 #include "wps/wps_defs.h" 21 #include "wps/wps_dev_attr.h" 22 #include "wps/wps_attr_parse.h" 32 #include "wps/wps_upnp.h" 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 in wps_stop_registrar() 971 hostapd_wps_set_vendor_ext(struct hostapd_data *hapd, struct wps_context *wps) hostapd_wps_set_vendor_ext() argument 996 hostapd_free_wps(struct wps_context *wps) hostapd_free_wps() argument 1014 struct wps_context *wps; hostapd_init_wps() local 1254 struct wps_context *wps = hapd->wps; hostapd_init_wps_complete() local 1273 hostapd_wps_nfc_clear(struct wps_context *wps) hostapd_wps_nfc_clear() argument 1576 hostapd_wps_upnp_init(struct hostapd_data *hapd, struct wps_context *wps) hostapd_wps_upnp_init() argument 1821 hostapd_wps_nfc_tag_process(struct hostapd_data *hapd, const struct wpabuf *wps) hostapd_wps_nfc_tag_process() argument 1844 const struct wpabuf *wps = data; hostapd_wps_nfc_tag_read() local 1898 struct wps_context *wps = hapd->wps; hostapd_wps_nfc_hs_cr() local 1935 struct wpabuf *wps; hostapd_wps_nfc_report_handover() local 2043 struct wps_context *wps = hapd->wps; hostapd_wps_nfc_token_enable() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant/ |
H A D | wps_supplicant.c | 24 #include "wps/wps_attr_parse.h" 147 struct wpabuf *wps; in wpas_wps_eapol_cb() local 150 wps = wpa_bss_get_vendor_ie_multi(bss, in wpas_wps_eapol_cb() 152 if (wps && wps_parse_msg(wps, &attr) == 0 && in wpas_wps_eapol_cb() 156 wpabuf_free(wps); in wpas_wps_eapol_cb() 1361 /* Cancel the wps pbc/pin requests */ 1531 struct wps_context *wps) in wpas_wps_set_uuid() 1542 if (wps != wpa_s->global->ifaces->wps) in wpas_wps_set_uuid() 1530 wpas_wps_set_uuid(struct wpa_supplicant *wpa_s, struct wps_context *wps) wpas_wps_set_uuid() argument 1564 wpas_wps_set_vendor_ext_m1(struct wpa_supplicant *wpa_s, struct wps_context *wps) wpas_wps_set_vendor_ext_m1() argument 1583 struct wps_context *wps; wpas_wps_init() local 1673 wpas_wps_nfc_clear(struct wps_context *wps) wpas_wps_nfc_clear() argument 1924 unsigned int pbc = 0, auth = 0, pin = 0, wps = 0; wpas_wps_notify_scan_results() local 2246 struct wps_context *wps = wpa_s->wps; wpas_wps_update_config() local 2299 struct wps_context *wps; wpas_wps_update_mac_addr() local 2385 struct wps_context *wps = wpa_s->wps; wpas_wps_start_nfc() local 2504 wpas_wps_nfc_tag_process(struct wpa_supplicant *wpa_s, const struct wpabuf *wps) wpas_wps_nfc_tag_process() argument 2532 const struct wpabuf *wps = data; wpas_wps_nfc_tag_read() local 2600 struct wps_context *wps = wpa_s->wps; wpas_wps_er_nfc_handover_sel() local 2664 struct wpabuf *wps; wpas_wps_nfc_rx_handover_sel() local 2803 struct wpabuf *wps; wpas_er_wps_nfc_report_handover() local 2944 struct wpabuf *wps; wpas_wps_update_ap_info_bss() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/wpa_supplicant/ |
H A D | wps_supplicant.c | 24 #include "wps/wps_attr_parse.h" 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() 1324 /* Cancel the wps pbc/pin requests */ 1493 struct wps_context *wps) in wpas_wps_set_uuid() 1504 if (wps != wpa_s->global->ifaces->wps) in wpas_wps_set_uuid() 1492 wpas_wps_set_uuid(struct wpa_supplicant *wpa_s, struct wps_context *wps) wpas_wps_set_uuid() argument 1526 wpas_wps_set_vendor_ext_m1(struct wpa_supplicant *wpa_s, struct wps_context *wps) wpas_wps_set_vendor_ext_m1() argument 1545 struct wps_context *wps; wpas_wps_init() local 1630 wpas_wps_nfc_clear(struct wps_context *wps) wpas_wps_nfc_clear() argument 1865 unsigned int pbc = 0, auth = 0, pin = 0, wps = 0; wpas_wps_notify_scan_results() local 2187 struct wps_context *wps = wpa_s->wps; wpas_wps_update_config() local 2316 struct wps_context *wps = wpa_s->wps; wpas_wps_start_nfc() local 2435 wpas_wps_nfc_tag_process(struct wpa_supplicant *wpa_s, const struct wpabuf *wps) wpas_wps_nfc_tag_process() argument 2463 const struct wpabuf *wps = data; wpas_wps_nfc_tag_read() local 2531 struct wps_context *wps = wpa_s->wps; wpas_wps_er_nfc_handover_sel() local 2595 struct wpabuf *wps; wpas_wps_nfc_rx_handover_sel() local 2734 struct wpabuf *wps; wpas_er_wps_nfc_report_handover() local 2874 struct wpabuf *wps; wpas_wps_update_ap_info_bss() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_peer/ |
H A D | eap_wsc.c | 15 #include "wps/wps.h" 16 #include "wps/wps_defs.h" 29 struct wps_data *wps; member 149 struct wps_context *wps; in eap_wsc_init() local 155 wps = sm->wps; in eap_wsc_init() 156 if (wps == NULL) { in eap_wsc_init() 180 data->wps_ctx = wps; in eap_wsc_init() 183 cfg.wps in eap_wsc_init() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/ |
H A D | eap_wsc.c | 15 #include "wps/wps.h" 16 #include "wps/wps_defs.h" 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 in eap_wsc_init() [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
H A D | eap_server_wsc.c | 16 #include "wps/wps.h" 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 in eap_wsc_init() [all...] |