Lines Matching defs:auth
35 struct dpp_authentication *auth);
41 struct dpp_authentication *auth,
44 struct dpp_authentication *auth);
59 struct dpp_authentication *auth = hapd->dpp_auth;
65 if (auth && auth->response_pending &&
66 dpp_notify_new_qr_code(auth, bi) == 1) {
71 MAC2STR(auth->peer_mac_addr), auth->curr_freq,
73 hostapd_drv_send_action(hapd, auth->curr_freq, 0,
74 auth->peer_mac_addr,
174 struct dpp_authentication *auth = hapd->dpp_auth;
176 if (!auth || !auth->resp_msg)
183 MAC2STR(auth->peer_mac_addr), auth->curr_freq,
185 hostapd_drv_send_action(hapd, auth->curr_freq, 500, auth->peer_mac_addr,
186 wpabuf_head(auth->resp_msg),
187 wpabuf_len(auth->resp_msg));
193 struct dpp_authentication *auth = hapd->dpp_auth;
196 if (!auth || !auth->resp_msg)
203 auth->auth_resp_tries++;
204 if (auth->auth_resp_tries >= max_tries) {
308 struct dpp_authentication *auth;
350 auth = dpp_auth_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
354 if (!auth)
357 hostapd_dpp_set_testing_options(hapd, auth);
358 if (dpp_set_configurator(auth, cmd) < 0) {
359 dpp_auth_deinit(auth);
363 return dpp_tcp_auth(hapd->iface->interfaces->dpp, conn, auth,
494 struct dpp_authentication *auth = hapd->dpp_auth;
513 if (auth->connect_on_tx_status) {
555 if (auth->waiting_auth_resp) {
562 if (auth->waiting_auth_conf) {
568 if (auth->waiting_auth_conf &&
569 auth->auth_resp_status == DPP_STATUS_OK) {
579 if (!is_broadcast_ether_addr(dst) && auth->waiting_auth_resp && ok) {
582 auth->auth_req_ack = 1;
610 struct dpp_authentication *auth = hapd->dpp_auth;
615 if (!auth || !auth->waiting_auth_resp)
627 if (auth->auth_req_ack && diff_ms >= wait_time) {
635 dpp_auth_deinit(auth);
659 freq = auth->curr_freq;
660 if (auth->neg_freq > 0)
661 freq = auth->neg_freq;
683 struct dpp_authentication *auth = hapd->dpp_auth;
685 if (!auth || !auth->waiting_auth_conf)
693 dpp_auth_deinit(auth);
699 struct dpp_authentication *auth)
703 auth->config_obj_override =
706 auth->discovery_override =
709 auth->groups_override = os_strdup(hapd->dpp_groups_override);
710 auth->ignore_netaccesskey_mismatch =
729 struct dpp_authentication *auth = hapd->dpp_auth;
734 if (!auth)
737 if (auth->freq_idx == 0)
740 if (auth->freq_idx >= auth->num_freq) {
741 auth->num_freq_iters++;
746 if (auth->num_freq_iters >= max_tries || auth->auth_req_ack) {
758 auth->freq_idx = 0;
779 freq = auth->freq[auth->freq_idx++];
780 auth->curr_freq = freq;
782 if (!is_zero_ether_addr(auth->peer_mac_addr))
783 dst = auth->peer_mac_addr;
784 else if (is_zero_ether_addr(auth->peer_bi->mac_addr))
787 dst = auth->peer_bi->mac_addr;
799 if (auth->neg_freq > 0 && freq != auth->neg_freq) {
802 freq, auth->neg_freq);
807 auth->auth_req_ack = 0;
818 struct dpp_authentication *auth)
823 for (i = 0; i < auth->num_conf_obj; i++)
824 hostapd_dpp_handle_config_obj(hapd, auth,
825 &auth->conf_obj[i]);
836 struct dpp_authentication *auth;
939 auth = dpp_auth_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
943 if (!auth)
945 hostapd_dpp_set_testing_options(hapd, auth);
946 if (dpp_set_configurator(auth, cmd) < 0) {
947 dpp_auth_deinit(auth);
951 auth->neg_freq = neg_freq;
954 os_memcpy(auth->peer_mac_addr, peer_bi->mac_addr, ETH_ALEN);
958 return dpp_tcp_init(hapd->iface->interfaces->dpp, auth,
967 hapd->dpp_auth = auth;
1140 struct dpp_authentication *auth,
1188 if (auth->net_access_key) {
1192 hexlen = 2 * wpabuf_len(auth->net_access_key) + 1;
1196 wpabuf_head(auth->net_access_key),
1197 wpabuf_len(auth->net_access_key));
1198 if (auth->net_access_key_expiry)
1202 auth->net_access_key_expiry);
1243 struct dpp_authentication *auth = hapd->dpp_auth;
1245 if (!auth || !auth->waiting_new_key)
1261 struct dpp_authentication *auth = hapd->dpp_auth;
1265 if (!auth || !auth->auth_success) {
1294 res = dpp_conf_resp_rx(auth, resp);
1308 hostapd_dpp_handle_config_obj(hapd, auth, &auth->conf_obj[0]);
1309 if (hostapd_dpp_handle_key_pkg(hapd, auth->conf_key_pkg) < 0)
1323 if (auth->peer_version >= 2 &&
1324 auth->conf_resp_status == DPP_STATUS_OK) {
1328 msg = dpp_build_conf_result(auth, status);
1334 MAC2STR(addr), auth->curr_freq,
1336 hostapd_drv_send_action(hapd, auth->curr_freq, 0,
1342 auth->connect_on_tx_status = 1;
1354 struct dpp_authentication *auth = hapd->dpp_auth;
1358 buf = dpp_build_conf_req_helper(auth, hapd->conf->dpp_name,
1370 MAC2STR(auth->peer_mac_addr), auth->curr_freq);
1372 res = gas_query_ap_req(hapd->gas, auth->peer_mac_addr, auth->curr_freq,
1410 struct dpp_authentication *auth = hapd->dpp_auth;
1416 if (!auth) {
1422 if (!is_zero_ether_addr(auth->peer_mac_addr) &&
1423 !ether_addr_equal(src, auth->peer_mac_addr)) {
1425 MACSTR ") - drop", MAC2STR(auth->peer_mac_addr));
1431 if (auth->curr_freq != freq && auth->neg_freq == freq) {
1434 auth->curr_freq = freq;
1438 msg = dpp_auth_resp_rx(auth, hdr, buf, len);
1440 if (auth->auth_resp_status == DPP_STATUS_RESPONSE_PENDING) {
1447 os_memcpy(auth->peer_mac_addr, src, ETH_ALEN);
1450 " freq=%u type=%d", MAC2STR(src), auth->curr_freq,
1452 hostapd_drv_send_action(hapd, auth->curr_freq, 0, src,
1462 struct dpp_authentication *auth = hapd->dpp_auth;
1467 if (!auth) {
1473 if (!ether_addr_equal(src, auth->peer_mac_addr)) {
1475 MACSTR ") - drop", MAC2STR(auth->peer_mac_addr));
1479 if (dpp_auth_conf_rx(auth, hdr, buf, len) < 0) {
1494 struct dpp_authentication *auth = hapd->dpp_auth;
1496 if (!auth || !auth->waiting_conf_result)
1502 dpp_auth_deinit(auth);
1511 struct dpp_authentication *auth = hapd->dpp_auth;
1513 if (!auth || !auth->waiting_conf_result)
1520 dpp_auth_deinit(auth);
1567 struct dpp_authentication *auth = hapd->dpp_auth;
1576 if (!auth || !auth->waiting_conf_result) {
1582 if (!ether_addr_equal(src, auth->peer_mac_addr)) {
1584 MACSTR ") - drop", MAC2STR(auth->peer_mac_addr));
1588 status = dpp_conf_result_rx(auth, hdr, buf, len);
1590 if (status == DPP_STATUS_OK && auth->send_conn_status) {
1593 auth->conf_resp_status);
1597 auth->waiting_conn_status_result = 1;
1610 "conf_status=%d", auth->conf_resp_status);
1613 dpp_auth_deinit(auth);
1638 struct dpp_authentication *auth = hapd->dpp_auth;
1646 if (!auth || !auth->waiting_conn_status_result) {
1652 status = dpp_conn_status_result_rx(auth, hdr, buf, len,
1661 dpp_auth_deinit(auth);
1676 struct dpp_authentication *auth;
1713 auth = dpp_auth_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
1716 if (!auth)
1718 hostapd_dpp_set_testing_options(hapd, auth);
1719 if (dpp_set_configurator(auth,
1721 dpp_auth_deinit(auth);
1725 auth->neg_freq = freq;
1729 os_memcpy(auth->peer_mac_addr, src, ETH_ALEN);
1731 hapd->dpp_auth = auth;
1743 struct dpp_authentication *auth = hapd->dpp_auth;
1745 if (!auth)
1750 dpp_auth_deinit(auth);
1763 struct dpp_authentication *auth;
1812 auth = dpp_reconfig_init(hapd->iface->interfaces->dpp, hapd->msg_ctx,
1815 if (!auth)
1817 hostapd_dpp_set_testing_options(hapd, auth);
1818 if (dpp_set_configurator(auth, hapd->dpp_configurator_params) < 0) {
1819 dpp_auth_deinit(auth);
1823 os_memcpy(auth->peer_mac_addr, src, ETH_ALEN);
1824 hapd->dpp_auth = auth;
1843 wpabuf_head(auth->reconfig_req_msg),
1844 wpabuf_len(auth->reconfig_req_msg)) < 0) {
1856 struct dpp_authentication *auth = hapd->dpp_auth;
1862 if (!auth || !auth->reconfig || !auth->configurator) {
1868 if (!ether_addr_equal(src, auth->peer_mac_addr)) {
1870 MACSTR ") - drop", MAC2STR(auth->peer_mac_addr));
1874 conf = dpp_reconfig_auth_resp_rx(auth, hdr, buf, len);
3078 struct dpp_authentication *auth = hapd->dpp_auth;
3082 if (!auth || (!auth->auth_success && !auth->reconfig_success) ||
3083 !ether_addr_equal(sa, auth->peer_mac_addr)) {
3095 if (hapd->dpp_auth_ok_on_ack && auth->configurator) {
3118 resp = dpp_conf_req_rx(auth, query, query_len);
3127 struct dpp_authentication *auth = hapd->dpp_auth;
3132 if (!auth)
3136 if (auth->waiting_new_key && ok) {
3150 if (ok && auth->peer_version >= 2 &&
3151 auth->conf_resp_status == DPP_STATUS_OK) {
3153 auth->waiting_conf_result = 1;
3166 "conf_status=%d", auth->conf_resp_status);
3190 struct dpp_authentication *auth;
3194 auth = dpp_alloc_auth(hapd->iface->interfaces->dpp, hapd->msg_ctx);
3195 if (!auth)
3199 hostapd_dpp_set_testing_options(hapd, auth);
3200 if (dpp_set_configurator(auth, cmd) == 0 &&
3201 dpp_configurator_own_config(auth, curve, 1) == 0) {
3202 hostapd_dpp_handle_config_obj(hapd, auth, &auth->conf_obj[0]);
3206 dpp_auth_deinit(auth);