Lines Matching full:auth

29 	struct dpp_authentication *auth;  member
32 int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
34 bool (*tcp_msg_sent)(void *ctx, struct dpp_authentication *auth);
86 int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
87 bool (*tcp_msg_sent)(void *ctx, struct dpp_authentication *auth);
121 dpp_auth_deinit(conn->auth); in dpp_connection_free()
228 struct dpp_authentication *auth = conn->auth; in dpp_controller_gas_done() local
230 if (auth->waiting_csr) { in dpp_controller_gas_done()
237 if (auth->waiting_new_key) { in dpp_controller_gas_done()
244 if (auth->peer_version >= 2 && in dpp_controller_gas_done()
245 auth->conf_resp_status == DPP_STATUS_OK) { in dpp_controller_gas_done()
247 auth->waiting_conf_result = 1; in dpp_controller_gas_done()
252 auth->conf_resp_status); in dpp_controller_gas_done()
300 if (conn->auth && conn->auth->connect_on_tx_status && in dpp_tcp_send()
302 conn->tcp_msg_sent(conn->cb_ctx, conn->auth)) in dpp_tcp_send()
305 } else if (conn->auth && (conn->ctrl || conn->auth->configurator) && in dpp_tcp_send()
345 struct dpp_authentication *auth = conn->auth; in dpp_controller_start_gas_client() local
350 buf = dpp_build_conf_req_helper(auth, dpp_name, conn->netrole, in dpp_controller_start_gas_client()
368 struct dpp_authentication *auth = conn->auth; in dpp_controller_auth_success() local
370 if (!auth) in dpp_controller_auth_success()
374 dpp_notify_auth_success(auth, initiator); in dpp_controller_auth_success()
379 if (auth->configurator) { in dpp_controller_auth_success()
381 auth->auth_success = 0; in dpp_controller_auth_success()
387 if (!auth->configurator) in dpp_controller_auth_success()
634 (!conn->auth || conn->auth->waiting_auth_resp)) { in dpp_relay_rx_action()
636 "DPP: Use existing TCP connection to Controller since no Auth Resp seen on it yet"); in dpp_relay_rx_action()
781 if (conn->auth) { in dpp_controller_rx_auth_req()
787 conn->auth = dpp_auth_req_rx(conn->ctrl->global, conn->msg_ctx, in dpp_controller_rx_auth_req()
791 if (!conn->auth) { in dpp_controller_rx_auth_req()
796 if (dpp_set_configurator(conn->auth, in dpp_controller_rx_auth_req()
800 return dpp_tcp_send_msg(conn, conn->auth->resp_msg); in dpp_controller_rx_auth_req()
807 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_auth_resp() local
811 if (!auth) in dpp_controller_rx_auth_resp()
816 msg = dpp_auth_resp_rx(auth, hdr, buf, len); in dpp_controller_rx_auth_resp()
818 if (auth->auth_resp_status == DPP_STATUS_RESPONSE_PENDING) { in dpp_controller_rx_auth_resp()
837 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_auth_conf() local
841 if (!auth) { in dpp_controller_rx_auth_conf()
847 if (dpp_auth_conf_rx(auth, hdr, buf, len) < 0) { in dpp_controller_rx_auth_conf()
862 if (!conn->auth->waiting_conf_result) in dpp_controller_conn_status_result_wait_timeout()
877 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_conf_result() local
881 if (!conn->ctrl && (!auth || !auth->configurator)) in dpp_controller_rx_conf_result()
886 if (!auth || !auth->waiting_conf_result) { in dpp_controller_rx_conf_result()
892 status = dpp_conf_result_rx(auth, hdr, buf, len); in dpp_controller_rx_conf_result()
893 if (status == DPP_STATUS_OK && auth->send_conn_status) { in dpp_controller_rx_conf_result()
896 auth->conf_resp_status); in dpp_controller_rx_conf_result()
898 auth->waiting_conn_status_result = 1; in dpp_controller_rx_conf_result()
909 "conf_resp_status=%d", auth->conf_resp_status); in dpp_controller_rx_conf_result()
920 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_conn_status_result() local
931 if (!auth || !auth->waiting_conn_status_result) { in dpp_controller_rx_conn_status_result()
937 status = dpp_conn_status_result_rx(auth, hdr, buf, len, in dpp_controller_rx_conn_status_result()
955 struct dpp_authentication *auth; in dpp_controller_rx_presence_announcement() local
976 if (conn->auth) { in dpp_controller_rx_presence_announcement()
982 auth = dpp_auth_init(dpp, conn->msg_ctx, peer_bi, NULL, in dpp_controller_rx_presence_announcement()
984 if (!auth) in dpp_controller_rx_presence_announcement()
986 if (dpp_set_configurator(auth, conn->ctrl->configurator_params) < 0) { in dpp_controller_rx_presence_announcement()
987 dpp_auth_deinit(auth); in dpp_controller_rx_presence_announcement()
991 conn->auth = auth; in dpp_controller_rx_presence_announcement()
992 return dpp_tcp_send_msg(conn, conn->auth->req_msg); in dpp_controller_rx_presence_announcement()
1004 struct dpp_authentication *auth; in dpp_controller_rx_reconfig_announcement() local
1007 if (conn->auth) { in dpp_controller_rx_reconfig_announcement()
1044 auth = dpp_reconfig_init(dpp, conn->msg_ctx, conf, 0, group, in dpp_controller_rx_reconfig_announcement()
1046 if (!auth) in dpp_controller_rx_reconfig_announcement()
1048 if (dpp_set_configurator(auth, conn->ctrl->configurator_params) < 0) { in dpp_controller_rx_reconfig_announcement()
1049 dpp_auth_deinit(auth); in dpp_controller_rx_reconfig_announcement()
1053 conn->auth = auth; in dpp_controller_rx_reconfig_announcement()
1054 return dpp_tcp_send_msg(conn, auth->reconfig_req_msg); in dpp_controller_rx_reconfig_announcement()
1062 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_reconfig_auth_resp() local
1068 if (!auth || !auth->reconfig || !auth->configurator) { in dpp_controller_rx_reconfig_auth_resp()
1074 conf = dpp_reconfig_auth_resp_rx(auth, hdr, buf, len); in dpp_controller_rx_reconfig_auth_resp()
1104 if (conn->pkex || conn->auth) { in dpp_controller_rx_pkex_exchange_req()
1391 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_gas_req() local
1399 if (!auth || (!conn->ctrl && !auth->configurator) || in dpp_controller_rx_gas_req()
1400 (!auth->auth_success && !auth->reconfig_success)) { in dpp_controller_rx_gas_req()
1434 resp = dpp_conf_req_rx(auth, pos, slen); in dpp_controller_rx_gas_req()
1435 if (!resp && auth->waiting_cert) { in dpp_controller_rx_gas_req()
1442 if (!resp && auth->waiting_config && auth->peer_bi) { in dpp_controller_rx_gas_req()
1445 int i, res, *opclass = auth->e_band_support; in dpp_controller_rx_gas_req()
1449 if (auth->e_name) { in dpp_controller_rx_gas_req()
1450 size_t e_len = os_strlen(auth->e_name); in dpp_controller_rx_gas_req()
1455 (const u8 *) auth->e_name, e_len); in dpp_controller_rx_gas_req()
1471 if (auth->e_mud_url) { in dpp_controller_rx_gas_req()
1472 size_t e_len = os_strlen(auth->e_mud_url); in dpp_controller_rx_gas_req()
1474 if (!has_ctrl_char((const u8 *) auth->e_mud_url, e_len)) in dpp_controller_rx_gas_req()
1475 mud_url = auth->e_mud_url; in dpp_controller_rx_gas_req()
1479 auth->peer_bi->id, dpp_netrole_str(auth->e_netrole), in dpp_controller_rx_gas_req()
1496 struct dpp_authentication *auth = conn->auth; in dpp_controller_rx_gas_comeback_req() local
1505 if (!auth || (!conn->ctrl && !auth->configurator) || in dpp_controller_rx_gas_comeback_req()
1506 (!auth->auth_success && !auth->reconfig_success) || in dpp_controller_rx_gas_comeback_req()
1519 if (!auth->conf_resp_tcp) { in dpp_controller_rx_gas_comeback_req()
1527 resp = auth->conf_resp_tcp; in dpp_controller_rx_gas_comeback_req()
1528 auth->conf_resp_tcp = NULL; in dpp_controller_rx_gas_comeback_req()
1536 struct dpp_authentication *auth = conn->auth; in dpp_tcp_build_csr() local
1538 if (!auth || !auth->csrattrs) in dpp_tcp_build_csr()
1542 wpabuf_free(auth->csr); in dpp_tcp_build_csr()
1544 auth->csr = dpp_build_csr(auth, conn->name ? conn->name : "Test"); in dpp_tcp_build_csr()
1545 if (!auth->csr) { in dpp_tcp_build_csr()
1558 struct dpp_authentication *auth = conn->auth; in dpp_tcp_build_new_key() local
1560 if (!auth || !auth->waiting_new_key) in dpp_tcp_build_new_key()
1571 struct dpp_authentication *auth = conn->auth; in dpp_tcp_rx_gas_resp() local
1579 if (auth) in dpp_tcp_rx_gas_resp()
1580 res = dpp_conf_resp_rx(auth, resp); in dpp_tcp_rx_gas_resp()
1603 res = conn->process_conf_obj(conn->cb_ctx, auth); in dpp_tcp_rx_gas_resp()
1607 if (auth->peer_version < 2 || auth->conf_resp_status != DPP_STATUS_OK) in dpp_tcp_rx_gas_resp()
1612 msg = dpp_build_conf_result(auth, status); in dpp_tcp_rx_gas_resp()
1629 struct dpp_authentication *auth = conn->auth; in dpp_tcp_gas_query_comeback() local
1632 if (!auth) in dpp_tcp_gas_query_comeback()
1993 struct dpp_authentication *auth) in dpp_tcp_auth_start() argument
1997 hdr = wpabuf_head(auth->req_msg); in dpp_tcp_auth_start()
1998 end = hdr + wpabuf_len(auth->req_msg); in dpp_tcp_auth_start()
2009 int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth, in dpp_tcp_init() argument
2016 struct dpp_authentication *auth), in dpp_tcp_init() argument
2018 struct dpp_authentication *auth)) in dpp_tcp_init()
2029 dpp_auth_deinit(auth); in dpp_tcp_init()
2035 dpp_auth_deinit(auth); in dpp_tcp_init()
2052 conn->auth = auth; in dpp_tcp_init()
2081 if (dpp_tcp_auth_start(conn, auth) < 0) in dpp_tcp_init()
2095 struct dpp_authentication *auth, const char *name, in dpp_tcp_auth() argument
2100 struct dpp_authentication *auth), in dpp_tcp_auth() argument
2102 struct dpp_authentication *auth)) in dpp_tcp_auth()
2120 conn->auth = auth; in dpp_tcp_auth()
2122 if (dpp_tcp_auth_start(conn, auth) < 0) in dpp_tcp_auth()
2241 static bool dpp_tcp_peer_id_match(struct dpp_authentication *auth, in dpp_tcp_peer_id_match() argument
2244 return auth && in dpp_tcp_peer_id_match()
2245 ((auth->peer_bi && auth->peer_bi->id == id) || in dpp_tcp_peer_id_match()
2246 (auth->tmp_peer_bi && auth->tmp_peer_bi->id == id)); in dpp_tcp_peer_id_match()
2256 if (dpp_tcp_peer_id_match(conn->auth, id)) in dpp_tcp_get_auth()
2257 return conn->auth; in dpp_tcp_get_auth()
2274 if (dpp_tcp_peer_id_match(conn->auth, id)) in dpp_controller_get_auth()
2275 return conn->auth; in dpp_controller_get_auth()
2292 struct dpp_authentication *auth = conn->auth; in dpp_controller_new_qr_code() local
2294 if (!auth->response_pending || in dpp_controller_new_qr_code()
2295 dpp_notify_new_qr_code(auth, bi) != 1) in dpp_controller_new_qr_code()
2299 dpp_tcp_send_msg(conn, conn->auth->resp_msg); in dpp_controller_new_qr_code()
2596 if (conn->auth && conn->auth->conn_status_requested) in dpp_tcp_conn_status_requested()
2610 struct dpp_authentication *auth = conn->auth; in dpp_tcp_send_conn_status_msg() local
2615 auth->conn_status_requested = 0; in dpp_tcp_send_conn_status_msg()
2617 msg = dpp_build_conn_status_result(auth, result, ssid, ssid_len, in dpp_tcp_send_conn_status_msg()
2653 if (conn->auth && conn->auth->conn_status_requested) { in dpp_tcp_send_conn_status()