• Home
  • Raw
  • Download

Lines Matching refs:bi

44 	struct dpp_bootstrap_info *bi;  in hapd_dpp_next_id()  local
47 dl_list_for_each(bi, &hapd->dpp_bootstrap, struct dpp_bootstrap_info, in hapd_dpp_next_id()
49 if (bi->id > max_id) in hapd_dpp_next_id()
50 max_id = bi->id; in hapd_dpp_next_id()
64 struct dpp_bootstrap_info *bi; in hostapd_dpp_qr_code() local
67 bi = dpp_parse_qr_code(cmd); in hostapd_dpp_qr_code()
68 if (!bi) in hostapd_dpp_qr_code()
71 bi->id = hapd_dpp_next_id(hapd); in hostapd_dpp_qr_code()
72 dl_list_add(&hapd->dpp_bootstrap, &bi->list); in hostapd_dpp_qr_code()
75 dpp_notify_new_qr_code(auth, bi) == 1) { in hostapd_dpp_qr_code()
84 return bi->id; in hostapd_dpp_qr_code()
121 struct dpp_bootstrap_info *bi; in hostapd_dpp_bootstrap_gen() local
123 bi = os_zalloc(sizeof(*bi)); in hostapd_dpp_bootstrap_gen()
124 if (!bi) in hostapd_dpp_bootstrap_gen()
128 bi->type = DPP_BOOTSTRAP_QR_CODE; in hostapd_dpp_bootstrap_gen()
130 bi->type = DPP_BOOTSTRAP_PKEX; in hostapd_dpp_bootstrap_gen()
148 pk = dpp_keygen(bi, curve, privkey, privkey_len); in hostapd_dpp_bootstrap_gen()
154 if (dpp_parse_uri_chan_list(bi, chan) < 0) in hostapd_dpp_bootstrap_gen()
159 if (dpp_parse_uri_mac(bi, mac) < 0) in hostapd_dpp_bootstrap_gen()
164 if (dpp_parse_uri_info(bi, info) < 0) in hostapd_dpp_bootstrap_gen()
169 bi->uri = os_malloc(len + 1); in hostapd_dpp_bootstrap_gen()
170 if (!bi->uri) in hostapd_dpp_bootstrap_gen()
172 os_snprintf(bi->uri, len + 1, "DPP:%s%s%s%s%s%s%s%s%sK:%s;;", in hostapd_dpp_bootstrap_gen()
177 bi->id = hapd_dpp_next_id(hapd); in hostapd_dpp_bootstrap_gen()
178 dl_list_add(&hapd->dpp_bootstrap, &bi->list); in hostapd_dpp_bootstrap_gen()
179 ret = bi->id; in hostapd_dpp_bootstrap_gen()
180 bi = NULL; in hostapd_dpp_bootstrap_gen()
189 dpp_bootstrap_info_free(bi); in hostapd_dpp_bootstrap_gen()
197 struct dpp_bootstrap_info *bi; in dpp_bootstrap_get_id() local
199 dl_list_for_each(bi, &hapd->dpp_bootstrap, struct dpp_bootstrap_info, in dpp_bootstrap_get_id()
201 if (bi->id == id) in dpp_bootstrap_get_id()
202 return bi; in dpp_bootstrap_get_id()
210 struct dpp_bootstrap_info *bi, *tmp; in dpp_bootstrap_del() local
213 dl_list_for_each_safe(bi, tmp, &hapd->dpp_bootstrap, in dpp_bootstrap_del()
215 if (id && bi->id != id) in dpp_bootstrap_del()
218 dl_list_del(&bi->list); in dpp_bootstrap_del()
219 dpp_bootstrap_info_free(bi); in dpp_bootstrap_del()
247 struct dpp_bootstrap_info *bi; in hostapd_dpp_bootstrap_get_uri() local
249 bi = dpp_bootstrap_get_id(hapd, id); in hostapd_dpp_bootstrap_get_uri()
250 if (!bi) in hostapd_dpp_bootstrap_get_uri()
252 return bi->uri; in hostapd_dpp_bootstrap_get_uri()
259 struct dpp_bootstrap_info *bi; in hostapd_dpp_bootstrap_info() local
261 bi = dpp_bootstrap_get_id(hapd, id); in hostapd_dpp_bootstrap_info()
262 if (!bi) in hostapd_dpp_bootstrap_info()
269 dpp_bootstrap_type_txt(bi->type), in hostapd_dpp_bootstrap_info()
270 MAC2STR(bi->mac_addr), in hostapd_dpp_bootstrap_info()
271 bi->info ? bi->info : "", in hostapd_dpp_bootstrap_info()
272 bi->num_freq, in hostapd_dpp_bootstrap_info()
273 bi->curve->name); in hostapd_dpp_bootstrap_info()
541 struct dpp_bootstrap_info *bi, *own_bi = NULL, *peer_bi = NULL; in hostapd_dpp_rx_auth_req() local
580 dl_list_for_each(bi, &hapd->dpp_bootstrap, struct dpp_bootstrap_info, in hostapd_dpp_rx_auth_req()
582 if (!own_bi && bi->own && in hostapd_dpp_rx_auth_req()
583 os_memcmp(bi->pubkey_hash, r_bootstrap, in hostapd_dpp_rx_auth_req()
587 own_bi = bi; in hostapd_dpp_rx_auth_req()
590 if (!peer_bi && !bi->own && in hostapd_dpp_rx_auth_req()
591 os_memcmp(bi->pubkey_hash, i_bootstrap, in hostapd_dpp_rx_auth_req()
595 peer_bi = bi; in hostapd_dpp_rx_auth_req()
1072 struct dpp_bootstrap_info *bi; in hostapd_dpp_rx_pkex_commit_reveal_req() local
1095 bi = os_zalloc(sizeof(*bi)); in hostapd_dpp_rx_pkex_commit_reveal_req()
1096 if (!bi) in hostapd_dpp_rx_pkex_commit_reveal_req()
1098 bi->id = hapd_dpp_next_id(hapd); in hostapd_dpp_rx_pkex_commit_reveal_req()
1099 bi->type = DPP_BOOTSTRAP_PKEX; in hostapd_dpp_rx_pkex_commit_reveal_req()
1100 os_memcpy(bi->mac_addr, src, ETH_ALEN); in hostapd_dpp_rx_pkex_commit_reveal_req()
1101 bi->num_freq = 1; in hostapd_dpp_rx_pkex_commit_reveal_req()
1102 bi->freq[0] = freq; in hostapd_dpp_rx_pkex_commit_reveal_req()
1103 bi->curve = pkex->own_bi->curve; in hostapd_dpp_rx_pkex_commit_reveal_req()
1104 bi->pubkey = pkex->peer_bootstrap_key; in hostapd_dpp_rx_pkex_commit_reveal_req()
1108 if (dpp_bootstrap_key_hash(bi) < 0) { in hostapd_dpp_rx_pkex_commit_reveal_req()
1109 dpp_bootstrap_info_free(bi); in hostapd_dpp_rx_pkex_commit_reveal_req()
1112 dl_list_add(&hapd->dpp_bootstrap, &bi->list); in hostapd_dpp_rx_pkex_commit_reveal_req()
1122 struct dpp_bootstrap_info *bi, *own_bi; in hostapd_dpp_rx_pkex_commit_reveal_resp() local
1142 bi = os_zalloc(sizeof(*bi)); in hostapd_dpp_rx_pkex_commit_reveal_resp()
1143 if (!bi) in hostapd_dpp_rx_pkex_commit_reveal_resp()
1145 bi->id = hapd_dpp_next_id(hapd); in hostapd_dpp_rx_pkex_commit_reveal_resp()
1146 bi->type = DPP_BOOTSTRAP_PKEX; in hostapd_dpp_rx_pkex_commit_reveal_resp()
1147 os_memcpy(bi->mac_addr, src, ETH_ALEN); in hostapd_dpp_rx_pkex_commit_reveal_resp()
1148 bi->num_freq = 1; in hostapd_dpp_rx_pkex_commit_reveal_resp()
1149 bi->freq[0] = freq; in hostapd_dpp_rx_pkex_commit_reveal_resp()
1150 bi->curve = own_bi->curve; in hostapd_dpp_rx_pkex_commit_reveal_resp()
1151 bi->pubkey = pkex->peer_bootstrap_key; in hostapd_dpp_rx_pkex_commit_reveal_resp()
1155 if (dpp_bootstrap_key_hash(bi) < 0) { in hostapd_dpp_rx_pkex_commit_reveal_resp()
1156 dpp_bootstrap_info_free(bi); in hostapd_dpp_rx_pkex_commit_reveal_resp()
1159 dl_list_add(&hapd->dpp_bootstrap, &bi->list); in hostapd_dpp_rx_pkex_commit_reveal_resp()
1162 bi->id, in hostapd_dpp_rx_pkex_commit_reveal_resp()