input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int rsn_preauth_iface_init(hostapd_data *hapd) {
char *start;
char *tmp;
char *end;
if (!hapd->conf->rsn_preauth_interfaces)
return 0;
tmp = strdup(hapd->conf->rsn_preauth_interfaces);
if (!tmp)
return -1;
for (start = tmp;; start = end + 1) {
while (*start == 32)
++start;
if (!*sta... | int rsn_preauth_iface_init(struct hostapd_data *hapd) {
char *tmp, *start, *end;
if (hapd->conf->rsn_preauth_interfaces == NULL)
return 0;
tmp = os_strdup(hapd->conf->rsn_preauth_interfaces);
if (tmp == NULL)
return -1;
start = tmp;
for (;;) {
while (*start == ' ')
start++;
if (*star... | rsn_preauth_iface_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rsn_preauth_receive(void *ctx, const u8 *src_addr, const u8 *buf,
size_t len) {
sta_info *sta;
hostapd_data *hapd;
hapd = (hostapd_data *)*((_QWORD *)ctx + 1);
wpa_printf(2, "RSN: receive pre-auth packet from interface '%s'",
*((const char **)ctx + 3));
if (len <= 0... | static void rsn_preauth_receive(void *ctx, const u8 *src_addr, const u8 *buf,
size_t len) {
struct rsn_preauth_interface *piface = ctx;
struct hostapd_data *hapd = piface->hapd;
struct ieee802_1x_hdr *hdr;
struct sta_info *sta;
struct l2_ethhdr *ethhdr;
wpa_printf(MSG_DEBUG,... | rsn_preauth_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rsn_preauth_send(hostapd_data *hapd, sta_info *sta, u8 *buf, size_t len) {
rsn_preauth_interface *piface;
l2_ethhdr *ethhdr;
for (piface = hapd->preauth_iface; piface && piface != sta->preauth_iface;
piface = piface->next)
;
if (piface) {
ethhdr = (l2_ethhdr *)malloc(len + 14);
if (ethh... | void rsn_preauth_send(struct hostapd_data *hapd, struct sta_info *sta, u8 *buf,
size_t len) {
struct rsn_preauth_interface *piface;
struct l2_ethhdr *ethhdr;
piface = hapd->preauth_iface;
while (piface) {
if (piface == sta->preauth_iface)
break;
piface = piface->next;
}
... | rsn_preauth_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int rsn_selector_to_bitfield(const u8 *s) {
if (WPA_GET_BE32_1(s) == (_DWORD)&loc_FAC00)
return 1;
if (WPA_GET_BE32_1(s) == 1027074)
return 8;
if (WPA_GET_BE32_1(s) == 1027076)
return 16;
if (WPA_GET_BE32_1(s) == 1027078)
return 32;
if (WPA_GET_BE32_1(s) == 1027080)
return 64;
if (WPA_GE... | static int rsn_selector_to_bitfield(const u8 *s) {
if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_NONE)
return WPA_CIPHER_NONE;
if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_TKIP)
return WPA_CIPHER_TKIP;
if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_CCMP)
return WPA_CIPHER_CCMP;
if (RSN_SELECTOR_GET(s) == ... | rsn_selector_to_bitfield | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rtnl_neigh_delete_fdb_entry(i802_bss *bss, const u8 *addr) { ; } | static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr) {
#ifdef CONFIG_LIBNL3_ROUTE
struct wpa_driver_nl80211_data *drv = bss->drv;
struct rtnl_neigh *rn;
struct nl_addr *nl_addr;
int err;
rn = rtnl_neigh_alloc();
if (!rn)
return;
rtnl_neigh_set_family(rn, AF_BRIDGE);
rtnl_n... | rtnl_neigh_delete_fdb_entry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_hs_icon_request(hostapd_data *hapd, const u8 *pos, const u8 *end,
anqp_query_info *qi) {
long v4;
long v5;
size_t v6;
qi->request |= 0x4000000u;
qi->icon_name = pos;
v6 = end - pos;
qi->icon_name_len = v6;
if (hapd->conf->hs20_icons_count)
wpa_printf(2, "AN... | static void rx_anqp_hs_icon_request(struct hostapd_data *hapd, const u8 *pos,
const u8 *end, struct anqp_query_info *qi) {
qi->request |= ANQP_REQ_ICON_REQUEST;
qi->icon_name = pos;
qi->icon_name_len = end - pos;
if (hapd->conf->hs20_icons_count) {
wpa_printf(MSG_DEBUG, "... | rx_anqp_hs_icon_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_hs_nai_home_realm(hostapd_data *hapd, const u8 *pos, const u8 *end,
anqp_query_info *qi) {
long v4;
long v5;
size_t v6;
qi->request |= 0x400000u;
qi->home_realm_query = pos;
v6 = end - pos;
qi->home_realm_query_len = v6;
if (hapd->conf->nai_realm_data)
wp... | static void rx_anqp_hs_nai_home_realm(struct hostapd_data *hapd, const u8 *pos,
const u8 *end,
struct anqp_query_info *qi) {
qi->request |= ANQP_REQ_NAI_HOME_REALM;
qi->home_realm_query = pos;
qi->home_realm_query_len = end - pos;
if (h... | rx_anqp_hs_nai_home_realm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_hs_query_list(hostapd_data *hapd, u8 subtype,
anqp_query_info *qi) {
switch (subtype) {
case 2u:
set_anqp_req((unsigned int)&loc_40000, "HS Capability List", 1, qi);
break;
case 3u:
set_anqp_req(0x80000u, "Operator Friendly Name",
hapd->conf->hs... | static void rx_anqp_hs_query_list(struct hostapd_data *hapd, u8 subtype,
struct anqp_query_info *qi) {
switch (subtype) {
case HS20_STYPE_CAPABILITY_LIST:
set_anqp_req(ANQP_REQ_HS_CAPABILITY_LIST, "HS Capability List", 1, qi);
break;
case HS20_STYPE_OPERATOR_FRIENDLY_NAME... | rx_anqp_hs_query_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_query_list(hostapd_data *hapd, const u8 *pos, const u8 *end,
anqp_query_info *qi) {
u16 v4;
const u8 *posa;
posa = pos;
wpa_printf(2, "ANQP: %u Info IDs requested in Query list",
(unsigned int)((_DWORD)end - (_DWORD)pos) >> 1);
while (end - posa > 1) {
v4... | static void rx_anqp_query_list(struct hostapd_data *hapd, const u8 *pos,
const u8 *end, struct anqp_query_info *qi) {
wpa_printf(MSG_DEBUG, "ANQP: %u Info IDs requested in Query list",
(unsigned int)(end - pos) / 2);
while (end - pos >= 2) {
rx_anqp_query_list_id(hap... | rx_anqp_query_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_query_list_id(hostapd_data *hapd, u16 info_id,
anqp_query_info *qi) {
anqp_element *anqp_elem;
anqp_element *v4;
anqp_element *v5;
anqp_element *v6;
anqp_element *v7;
anqp_element *v8;
anqp_element *v9;
switch (info_id) {
case 0x101u:
set_anqp_req(2u, "Capa... | static void rx_anqp_query_list_id(struct hostapd_data *hapd, u16 info_id,
struct anqp_query_info *qi) {
switch (info_id) {
case ANQP_CAPABILITY_LIST:
set_anqp_req(ANQP_REQ_CAPABILITY_LIST, "Capability List", 1, qi);
break;
case ANQP_VENUE_NAME:
set_anqp_req(ANQP_REQ_V... | rx_anqp_query_list_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_vendor_specific(hostapd_data *hapd, const u8 *pos, const u8 *end,
anqp_query_info *qi) {
const u8 *posa;
u32 oui;
if (end - pos > 3) {
oui = WPA_GET_BE24_8(pos);
posa = pos + 3;
if (oui == 5271450) {
if (*posa == 17)
rx_anqp_vendor_specific_hs20... | static void rx_anqp_vendor_specific(struct hostapd_data *hapd, const u8 *pos,
const u8 *end, struct anqp_query_info *qi) {
u32 oui;
if (end - pos < 4) {
wpa_printf(MSG_DEBUG, "ANQP: Too short vendor specific ANQP "
"Query element");
return;
}
... | rx_anqp_vendor_specific | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void rx_anqp_vendor_specific_hs20(hostapd_data *hapd, const u8 *pos,
const u8 *end, anqp_query_info *qi) {
u8 *posa;
u8 subtype;
if (end - pos > 1) {
subtype = *pos;
posa = (u8 *)(pos + 2);
if (*pos == 10) {
rx_anqp_hs_icon_request(hapd, posa, end, qi);
r... | static void rx_anqp_vendor_specific_hs20(struct hostapd_data *hapd,
const u8 *pos, const u8 *end,
struct anqp_query_info *qi) {
u8 subtype;
if (end - pos <= 1)
return;
subtype = *pos++;
pos++;
switch (subtype) {
case HS2... | rx_anqp_vendor_specific_hs20 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_accept_sta(hostapd_data *hapd, sta_info *sta) {
vlan_description vlan_desc;
unsigned long v3;
v3 = __readfsqword(0x28u);
if (!sta->sae->tmp || sta->sae->tmp->vlan_id <= 0)
goto LABEL_8;
wpa_printf(2, "SAE: Assign STA %02x:%02x:%02x:%02x:%02x:%02x to VLAN ID %d",
sta->addr[0], sta->a... | void sae_accept_sta(struct hostapd_data *hapd, struct sta_info *sta) {
#ifndef CONFIG_NO_VLAN
struct vlan_description vlan_desc;
if (sta->sae->tmp && sta->sae->tmp->vlan_id > 0) {
wpa_printf(MSG_DEBUG, "SAE: Assign STA " MACSTR " to VLAN ID %d",
MAC2STR(sta->addr), sta->sae->tmp->vlan_id);
... | sae_accept_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_check_big_sync(hostapd_data *hapd, sta_info *sta) {
if (sta->sae->sync <= hapd->conf->sae_sync)
return 0;
sae_set_state(sta, sae_state_SAE_NOTHING, "Sync > dot11RSNASAESync");
sta->sae->sync = 0;
return -1;
} | static int sae_check_big_sync(struct hostapd_data *hapd, struct sta_info *sta) {
if (sta->sae->sync > hapd->conf->sae_sync) {
sae_set_state(sta, SAE_NOTHING, "Sync > dot11RSNASAESync");
sta->sae->sync = 0;
return -1;
}
return 0;
} | sae_check_big_sync | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_check_confirm(sae_data *sae, const u8 *data, size_t len) {
u16 v4;
size_t hash_len;
u8 verifier[72];
unsigned long v7;
v7 = __readfsqword(0x28u);
if (!sae->tmp)
return -1;
hash_len = sae->tmp->kck_len;
if (len < hash_len + 2) {
wpa_printf(2, "SAE: Too short confirm message");
return... | int sae_check_confirm(struct sae_data *sae, const u8 *data, size_t len) {
u8 verifier[SAE_MAX_HASH_LEN];
size_t hash_len;
if (!sae->tmp)
return -1;
hash_len = sae->tmp->kck_len;
if (len < 2 + hash_len) {
wpa_printf(MSG_DEBUG, "SAE: Too short confirm message");
return -1;
}
wpa_printf(MSG_DE... | sae_check_confirm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_clear_data(sae_data *sae) {
if (sae) {
sae_clear_temp_data(sae);
crypto_bignum_deinit(sae->peer_commit_scalar, 0);
crypto_bignum_deinit(sae->peer_commit_scalar_accepted, 0);
memset(sae, 0, sizeof(sae_data));
}
} | void sae_clear_data(struct sae_data *sae) {
if (sae == NULL)
return;
sae_clear_temp_data(sae);
crypto_bignum_deinit(sae->peer_commit_scalar, 0);
crypto_bignum_deinit(sae->peer_commit_scalar_accepted, 0);
os_memset(sae, 0, sizeof(*sae));
} | sae_clear_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_clear_retransmit_timer(hostapd_data *hapd, sta_info *sta) {
eloop_cancel_timeout((eloop_timeout_handler)auth_sae_retransmit_timer, hapd,
sta);
} | void sae_clear_retransmit_timer(struct hostapd_data *hapd,
struct sta_info *sta) {
eloop_cancel_timeout(auth_sae_retransmit_timer, hapd, sta);
} | sae_clear_retransmit_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_clear_temp_data(sae_data *sae) {
sae_temporary_data *tmp;
if (sae) {
if (sae->tmp) {
tmp = sae->tmp;
crypto_ec_deinit(tmp->ec);
crypto_bignum_deinit(tmp->prime_buf, 0);
crypto_bignum_deinit(tmp->order_buf, 0);
crypto_bignum_deinit(tmp->sae_rand, 1);
crypto_bignum_de... | void sae_clear_temp_data(struct sae_data *sae) {
struct sae_temporary_data *tmp;
if (sae == NULL || sae->tmp == NULL)
return;
tmp = sae->tmp;
crypto_ec_deinit(tmp->ec);
crypto_bignum_deinit(tmp->prime_buf, 0);
crypto_bignum_deinit(tmp->order_buf, 0);
crypto_bignum_deinit(tmp->sae_rand, 1);
crypto_bi... | sae_clear_temp_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_cn_confirm(sae_data *sae, const u8 *sc, const crypto_bignum *scalar1,
const u8 *element1, size_t element1_len,
const crypto_bignum *scalar2, const u8 *element2,
size_t element2_len, u8 *confirm) {
const u8 *addr[5];
size_t len[6];
u8 scalar_b1[512];... | static int sae_cn_confirm(struct sae_data *sae, const u8 *sc,
const struct crypto_bignum *scalar1,
const u8 *element1, size_t element1_len,
const struct crypto_bignum *scalar2,
const u8 *element2, size_t element2_len... | sae_cn_confirm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_cn_confirm_ecc(sae_data *sae, const u8 *sc,
const crypto_bignum *scalar1,
const crypto_ec_point *element1,
const crypto_bignum *scalar2,
const crypto_ec_point *element2, u8 *confirm) {
u8 element_b1[144];
u8 element_... | static int sae_cn_confirm_ecc(struct sae_data *sae, const u8 *sc,
const struct crypto_bignum *scalar1,
const struct crypto_ec_point *element1,
const struct crypto_bignum *scalar2,
const struct crypto_... | sae_cn_confirm_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_cn_confirm_ffc(sae_data *sae, const u8 *sc,
const crypto_bignum *scalar1,
const crypto_bignum *element1,
const crypto_bignum *scalar2,
const crypto_bignum *element2, u8 *confirm) {
u8 element_b1[512];
u8 element_b2[5... | static int sae_cn_confirm_ffc(struct sae_data *sae, const u8 *sc,
const struct crypto_bignum *scalar1,
const struct crypto_bignum *element1,
const struct crypto_bignum *scalar2,
const struct crypto_bi... | sae_cn_confirm_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_deinit_pt(sae_pt *pt) {
sae_pt *prev;
while (pt) {
crypto_ec_point_deinit(pt->ecc_pt, 1);
crypto_bignum_deinit(pt->ffc_pt, 1);
crypto_ec_deinit(pt->ec);
prev = pt;
pt = pt->next;
free(prev);
}
} | void sae_deinit_pt(struct sae_pt *pt) {
struct sae_pt *prev;
while (pt) {
crypto_ec_point_deinit(pt->ecc_pt, 1);
crypto_bignum_deinit(pt->ffc_pt, 1);
crypto_ec_deinit(pt->ec);
prev = pt;
pt = pt->next;
os_free(prev);
}
} | sae_deinit_pt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_commit(sae_data *sae) {
sae_temporary_data *tmp;
sae_temporary_data *v2;
_BOOL4 v3;
int ret;
crypto_bignum *mask;
mask = crypto_bignum_init();
if (!sae->tmp->sae_rand) {
tmp = sae->tmp;
tmp->sae_rand = crypto_bignum_init();
}
if (!sae->tmp->own_commit_scalar) {
v2 = sae->tm... | static int sae_derive_commit(struct sae_data *sae) {
struct crypto_bignum *mask;
int ret;
mask = crypto_bignum_init();
if (!sae->tmp->sae_rand)
sae->tmp->sae_rand = crypto_bignum_init();
if (!sae->tmp->own_commit_scalar)
sae->tmp->own_commit_scalar = crypto_bignum_init();
ret = !mask || !sae->tmp->... | sae_derive_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_commit_element_ecc(sae_data *sae, crypto_bignum *mask) {
sae_temporary_data *tmp;
if (!sae->tmp->own_commit_element_ecc) {
tmp = sae->tmp;
tmp->own_commit_element_ecc = crypto_ec_point_init(tmp->ec);
if (!sae->tmp->own_commit_element_ecc)
return -1;
}
if (crypto_ec_point_mul(sa... | static int sae_derive_commit_element_ecc(struct sae_data *sae,
struct crypto_bignum *mask) {
if (!sae->tmp->own_commit_element_ecc) {
sae->tmp->own_commit_element_ecc = crypto_ec_point_init(sae->tmp->ec);
if (!sae->tmp->own_commit_element_ecc)
return -1;
}
... | sae_derive_commit_element_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_commit_element_ffc(sae_data *sae, crypto_bignum *mask) {
sae_temporary_data *tmp;
if (!sae->tmp->own_commit_element_ffc) {
tmp = sae->tmp;
tmp->own_commit_element_ffc = crypto_bignum_init();
if (!sae->tmp->own_commit_element_ffc)
return -1;
}
if (crypto_bignum_exptmod(sae->tmp-... | static int sae_derive_commit_element_ffc(struct sae_data *sae,
struct crypto_bignum *mask) {
if (!sae->tmp->own_commit_element_ffc) {
sae->tmp->own_commit_element_ffc = crypto_bignum_init();
if (!sae->tmp->own_commit_element_ffc)
return -1;
}
if (crypto_big... | sae_derive_commit_element_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_k_ecc(sae_data *sae, u8 *k) {
int ret;
crypto_ec_point *K;
ret = -1;
K = crypto_ec_point_init(sae->tmp->ec);
if (K) {
if (crypto_ec_point_mul(sae->tmp->ec, sae->tmp->pwe_ecc,
sae->peer_commit_scalar, K) < 0 ||
crypto_ec_point_add(sae->tmp->ec, K, sae->tm... | static int sae_derive_k_ecc(struct sae_data *sae, u8 *k) {
struct crypto_ec_point *K;
int ret = -1;
K = crypto_ec_point_init(sae->tmp->ec);
if (K == NULL)
goto fail;
if (crypto_ec_point_mul(sae->tmp->ec, sae->tmp->pwe_ecc,
sae->peer_commit_scalar, K) < 0 ||
crypto_ec_poin... | sae_derive_k_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_k_ffc(sae_data *sae, u8 *k) {
int ret;
crypto_bignum *K;
ret = -1;
K = crypto_bignum_init();
if (K) {
if (crypto_bignum_exptmod(sae->tmp->pwe_ffc, sae->peer_commit_scalar,
sae->tmp->prime, K) < 0 ||
crypto_bignum_mulmod(K, sae->tmp->peer_commit_element... | static int sae_derive_k_ffc(struct sae_data *sae, u8 *k) {
struct crypto_bignum *K;
int ret = -1;
K = crypto_bignum_init();
if (K == NULL)
goto fail;
if (crypto_bignum_exptmod(sae->tmp->pwe_ffc, sae->peer_commit_scalar,
sae->tmp->prime, K) < 0 ||
crypto_bignum_mulmod(K,... | sae_derive_k_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_keys(sae_data *sae, const u8 *k) {
long v2;
int ret;
const u8 *salt;
wpabuf *rejected_groups;
size_t hash_len;
size_t salt_len;
size_t salt_lena;
size_t prime_len;
const crypto_bignum *tmp;
const wpabuf *own;
const wpabuf *peer;
const u8 *addr[1];
size_t len[1];
u8 zero[64];
... | static int sae_derive_keys(struct sae_data *sae, const u8 *k) {
u8 zero[SAE_MAX_HASH_LEN], val[SAE_MAX_PRIME_LEN];
const u8 *salt;
struct wpabuf *rejected_groups = NULL;
u8 keyseed[SAE_MAX_HASH_LEN];
u8 keys[2 * SAE_MAX_HASH_LEN + SAE_PMK_LEN];
struct crypto_bignum *tmp;
int ret = -1;
size_t hash_len, s... | sae_derive_keys | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
sae_pt *sae_derive_pt(int *groups, const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier) {
int *groupsa;
int i;
sae_pt *pt;
sae_pt *last;
sae_pt *tmp;
int default_groups[2];
unsigned long v17;
groupsa = groups;
v1... | struct sae_pt *sae_derive_pt(int *groups, const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier) {
struct sae_pt *pt = NULL, *last = NULL, *tmp;
int default_groups[] = {19, 0};
int i;
if (!groups)
groups = ... | sae_derive_pt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_ec_point *sae_derive_pt_ecc(crypto_ec *ec, int group, const u8 *ssid,
size_t ssid_len, const u8 *password,
size_t password_len,
const char *identifier) {
const crypto_bignum *bn;
const crypto_ec_point *p1... | static struct crypto_ec_point *
sae_derive_pt_ecc(struct crypto_ec *ec, int group, const u8 *ssid,
size_t ssid_len, const u8 *password, size_t password_len,
const char *identifier) {
u8 pwd_seed[64];
u8 pwd_value[SAE_MAX_ECC_PRIME_LEN * 2];
size_t pwd_value_len, hash_len, prime... | sae_derive_pt_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_bignum *sae_derive_pt_ffc(const dh_group *dh_0, int group,
const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier) {
const crypto_bignum *one;
const crypto_bignum *two;... | static struct crypto_bignum *
sae_derive_pt_ffc(const struct dh_group *dh, int group, const u8 *ssid,
size_t ssid_len, const u8 *password, size_t password_len,
const char *identifier) {
size_t hash_len, prime_len, pwd_value_len;
struct crypto_bignum *prime, *order;
struct crypt... | sae_derive_pt_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
sae_pt *sae_derive_pt_group(int group, const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier) {
sae_pt *pt;
wpa_printf(2, "SAE: Derive PT - group %d", group);
if (ssid_len > 0x20)
return 0;
pt = (sae_pt *)os_... | static struct sae_pt *sae_derive_pt_group(int group, const u8 *ssid,
size_t ssid_len, const u8 *password,
size_t password_len,
const char *identifier) {
struct sae_pt *pt;
wpa_printf(MSG_DE... | sae_derive_pt_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_pwe_ecc(sae_data *sae, const u8 *addr1, const u8 *addr2,
const u8 *password, size_t password_len) {
sae_temporary_data *tmp;
u8 counter;
u8 found;
u8 k;
int pwd_seed_odd;
int res;
unsigned int is_eq;
crypto_bignum *qr;
crypto_bignum *qnr;
crypto_bignum *x;
cry... | static int sae_derive_pwe_ecc(struct sae_data *sae, const u8 *addr1,
const u8 *addr2, const u8 *password,
size_t password_len) {
u8 counter, k;
u8 addrs[2 * ETH_ALEN];
const u8 *addr[2];
size_t len[2];
u8 *stub_password, *tmp_password;
int pwd_seed... | sae_derive_pwe_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_derive_pwe_ffc(sae_data *sae, const u8 *addr1, const u8 *addr2,
const u8 *password, size_t password_len) {
sae_temporary_data *tmp;
u8 counter;
u8 sel_counter;
u8 found;
u8 k;
u8 mask;
int res;
size_t prime_len;
u8 *pwe_buf;
crypto_bignum *pwe;
const u8 *addr[2];
s... | static int sae_derive_pwe_ffc(struct sae_data *sae, const u8 *addr1,
const u8 *addr2, const u8 *password,
size_t password_len) {
u8 counter, k, sel_counter = 0;
u8 addrs[2 * ETH_ALEN];
const u8 *addr[2];
size_t len[2];
u8 found = 0;
u8 mask;
str... | sae_derive_pwe_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_ec_point *sae_derive_pwe_from_pt_ecc(const sae_pt *pt, const u8 *addr1,
const u8 *addr2) {
crypto_bignum *tmp;
const crypto_bignum *val;
const crypto_bignum *one;
crypto_ec_point *pwe;
size_t prime_len;
size_t hash_len;
const crypto_bignum *order;
const... | struct crypto_ec_point *sae_derive_pwe_from_pt_ecc(const struct sae_pt *pt,
const u8 *addr1,
const u8 *addr2) {
u8 bin[SAE_MAX_ECC_PRIME_LEN * 2];
size_t prime_len;
const u8 *addr[2];
size_t len[2];
u8 salt[6... | sae_derive_pwe_from_pt_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_bignum *sae_derive_pwe_from_pt_ffc(const sae_pt *pt, const u8 *addr1,
const u8 *addr2) {
crypto_bignum *tmp;
const crypto_bignum *val;
const crypto_bignum *one;
const crypto_bignum *pwe;
const crypto_bignum *order;
const crypto_bignum *prime;
size_t prime_l... | struct crypto_bignum *sae_derive_pwe_from_pt_ffc(const struct sae_pt *pt,
const u8 *addr1,
const u8 *addr2) {
size_t prime_len;
const u8 *addr[2];
size_t len[2];
u8 salt[64], hash[64];
size_t hash_len;
struct c... | sae_derive_pwe_from_pt_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t sae_ecc_prime_len_2_hash_len(size_t prime_len) {
if (prime_len <= 0x20)
return 32;
if (prime_len > 0x30)
return 64;
return 48;
} | size_t sae_ecc_prime_len_2_hash_len(size_t prime_len) {
if (prime_len <= 256 / 8)
return 32;
if (prime_len <= 384 / 8)
return 48;
return 64;
} | sae_ecc_prime_len_2_hash_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
size_t sae_ffc_prime_len_2_hash_len(size_t prime_len) {
if (prime_len <= 0x100)
return 32;
if (prime_len > 0x180)
return 64;
return 48;
} | size_t sae_ffc_prime_len_2_hash_len(size_t prime_len) {
if (prime_len <= 2048 / 8)
return 32;
if (prime_len <= 3072 / 8)
return 48;
return 64;
} | sae_ffc_prime_len_2_hash_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *sae_get_password(hostapd_data *hapd, sta_info *sta,
const char *rx_id, sae_password_entry **pw_entry,
sae_pt **s_pt, const sae_pk **s_pk) {
char *password;
sae_password_entry *pw;
sae_pt *pt;
const sae_pk *pk;
password = 0;
pt = 0;
pk ... | static const char *sae_get_password(struct hostapd_data *hapd,
struct sta_info *sta, const char *rx_id,
struct sae_password_entry **pw_entry,
struct sae_pt **s_pt,
const struct... | sae_get_password | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_group_allowed(sae_data *sae, int *allowed_groups, u16 group) {
int i;
if (!allowed_groups)
goto LABEL_9;
for (i = 0; allowed_groups[i] > 0 && allowed_groups[i] != group; ++i)
;
if (allowed_groups[i] == group) {
LABEL_9:
if (sae->state != sae_state_SAE_COMMITTED || group == sae->group) {
... | u16 sae_group_allowed(struct sae_data *sae, int *allowed_groups, u16 group) {
if (allowed_groups) {
int i;
for (i = 0; allowed_groups[i] > 0; i++) {
if (allowed_groups[i] == group)
break;
}
if (allowed_groups[i] != group) {
wpa_printf(MSG_DEBUG,
"SAE: Proposed grou... | sae_group_allowed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_is_group_enabled(hostapd_data *hapd, int group) {
int i;
int *groups;
int default_groups[2];
unsigned long v6;
v6 = __readfsqword(0x28u);
groups = hapd->conf->sae_groups;
default_groups[0] = 19;
default_groups[1] = 0;
if (!groups)
groups = default_groups;
for (i = 0; groups[i] > 0; ++i)... | static int sae_is_group_enabled(struct hostapd_data *hapd, int group) {
int *groups = hapd->conf->sae_groups;
int default_groups[] = {19, 0};
int i;
if (!groups)
groups = default_groups;
for (i = 0; groups[i] > 0; i++) {
if (groups[i] == group)
return 1;
}
return 0;
} | sae_is_group_enabled | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_is_password_id_elem(const u8 *pos, const u8 *end) {
return end - pos > 2 && *pos == 0xFF && pos[1] && end - pos - 1 > pos[1] &&
pos[2] == 33;
} | static int sae_is_password_id_elem(const u8 *pos, const u8 *end) {
return end - pos >= 3 && pos[0] == WLAN_EID_EXTENSION && pos[1] >= 1 &&
end - pos - 2 >= pos[1] && pos[2] == WLAN_EID_EXT_PASSWORD_IDENTIFIER;
} | sae_is_password_id_elem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_is_rejected_groups_elem(const u8 *pos, const u8 *end) {
return end - pos > 2 && *pos == 0xFF && pos[1] > 1u &&
end - pos - 1 > pos[1] && pos[2] == 92;
} | static int sae_is_rejected_groups_elem(const u8 *pos, const u8 *end) {
return end - pos >= 3 && pos[0] == WLAN_EID_EXTENSION && pos[1] >= 2 &&
end - pos - 2 >= pos[1] && pos[2] == WLAN_EID_EXT_REJECTED_GROUPS;
} | sae_is_rejected_groups_elem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_is_token_container_elem(const u8 *pos, const u8 *end) {
return end - pos > 2 && *pos == 0xFF && pos[1] && end - pos - 1 > pos[1] &&
pos[2] == 93;
} | static int sae_is_token_container_elem(const u8 *pos, const u8 *end) {
return end - pos >= 3 && pos[0] == WLAN_EID_EXTENSION && pos[1] >= 1 &&
end - pos - 2 >= pos[1] && pos[2] == WLAN_EID_EXT_ANTI_CLOGGING_TOKEN;
} | sae_is_token_container_elem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_kdf_hash(size_t hash_len, const u8 *k, const char *label,
const u8 *context, size_t context_len, u8 *out,
size_t out_len) {
switch (hash_len) {
case ' ':
return sha256_prf(k, 0x20u, label, context, context_len, out, out_len);
case '0':
return sha384_prf(k, 0x30u, ... | static int sae_kdf_hash(size_t hash_len, const u8 *k, const char *label,
const u8 *context, size_t context_len, u8 *out,
size_t out_len) {
if (hash_len == 32)
return sha256_prf(k, hash_len, label, context, context_len, out, out_len);
#ifdef CONFIG_SHA384
if (hash_... | sae_kdf_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_max_min_addr(const u8 **addr, size_t *len, const u8 *addr1,
const u8 *addr2) {
*len = 6;
len[1] = 6;
if (memcmp(addr1, addr2, 6u) <= 0) {
*addr = addr2;
addr[1] = addr1;
} else {
*addr = addr1;
addr[1] = addr2;
}
} | static void sae_max_min_addr(const u8 *addr[], size_t len[], const u8 *addr1,
const u8 *addr2) {
len[0] = ETH_ALEN;
len[1] = ETH_ALEN;
if (os_memcmp(addr1, addr2, ETH_ALEN) > 0) {
addr[0] = addr1;
addr[1] = addr2;
} else {
addr[0] = addr2;
addr[1] = addr1;
}
} | sae_max_min_addr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_parse_commit(sae_data *sae, const u8 *data, size_t len,
const u8 **token, size_t *token_len, int *allowed_groups,
int h2e) {
u16 v8;
u16 res;
u16 resa;
u16 resb;
u16 resc;
u16 resd;
const u8 *pos;
const u8 *end;
unsigned long v19;
v19 = __readfsqwor... | u16 sae_parse_commit(struct sae_data *sae, const u8 *data, size_t len,
const u8 **token, size_t *token_len, int *allowed_groups,
int h2e) {
const u8 *pos = data, *end = data + len;
u16 res;
if (end - pos < 2)
return WLAN_STATUS_UNSPECIFIED_FAILURE;
res = sae_group_... | sae_parse_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_parse_commit_element(sae_data *sae, const u8 **pos, const u8 *end) {
if (sae->tmp->dh)
return sae_parse_commit_element_ffc(sae, pos, end);
else
return sae_parse_commit_element_ecc(sae, pos, end);
} | static u16 sae_parse_commit_element(struct sae_data *sae, const u8 **pos,
const u8 *end) {
if (sae->tmp->dh)
return sae_parse_commit_element_ffc(sae, pos, end);
return sae_parse_commit_element_ecc(sae, pos, end);
} | sae_parse_commit_element | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_parse_commit_element_ecc(sae_data *sae, const u8 **pos, const u8 *end) {
sae_temporary_data *tmp;
u8 prime[72];
unsigned long v6;
v6 = __readfsqword(0x28u);
if (2 * sae->tmp->prime_len <= end - *pos) {
if (crypto_bignum_to_bin(sae->tmp->prime, prime, 0x42u,
sae->tmp->... | static u16 sae_parse_commit_element_ecc(struct sae_data *sae, const u8 **pos,
const u8 *end) {
u8 prime[SAE_MAX_ECC_PRIME_LEN];
if (2 * sae->tmp->prime_len > end - *pos) {
wpa_printf(MSG_DEBUG, "SAE: Not enough data for "
"commit-element");
... | sae_parse_commit_element_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_parse_commit_element_ffc(sae_data *sae, const u8 **pos, const u8 *end) {
sae_temporary_data *tmp;
crypto_bignum *res;
crypto_bignum *one;
u8 one_bin[1];
unsigned long v8;
v8 = __readfsqword(0x28u);
one_bin[0] = 1;
if (sae->tmp->prime_len <= end - *pos) {
wpa_hexdump(2, "SAE: Peer commit-ele... | static u16 sae_parse_commit_element_ffc(struct sae_data *sae, const u8 **pos,
const u8 *end) {
struct crypto_bignum *res, *one;
const u8 one_bin[1] = {0x01};
if (sae->tmp->prime_len > end - *pos) {
wpa_printf(MSG_DEBUG, "SAE: Not enough data for "
... | sae_parse_commit_element_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 sae_parse_commit_scalar(sae_data *sae, const u8 **pos, const u8 *end) {
crypto_bignum *peer_scalar;
if (sae->tmp->prime_len <= end - *pos) {
peer_scalar = crypto_bignum_init_set(*pos, sae->tmp->prime_len);
if (peer_scalar) {
if (sae->state == sae_state_SAE_ACCEPTED &&
sae->peer_commit_s... | static u16 sae_parse_commit_scalar(struct sae_data *sae, const u8 **pos,
const u8 *end) {
struct crypto_bignum *peer_scalar;
if (sae->tmp->prime_len > end - *pos) {
wpa_printf(MSG_DEBUG, "SAE: Not enough data for scalar");
return WLAN_STATUS_UNSPECIFIED_FAILURE;
}
pe... | sae_parse_commit_scalar | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_parse_commit_token(sae_data *sae, const u8 **pos, const u8 *end,
const u8 **token, size_t *token_len, int h2e) {
int v6;
size_t scalar_elem_len;
unsigned long tlen;
if (token)
*token = 0;
if (token_len)
*token_len = 0;
if (!h2e) {
v6 = sae->tmp->ec ? 3 : 2;
... | static void sae_parse_commit_token(struct sae_data *sae, const u8 **pos,
const u8 *end, const u8 **token,
size_t *token_len, int h2e) {
size_t scalar_elem_len, tlen;
if (token)
*token = NULL;
if (token_len)
*token_len = 0;
if (h2e)
... | sae_parse_commit_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_parse_password_identifier(sae_data *sae, const u8 **pos,
const u8 *end) {
sae_temporary_data *tmp;
u8 len;
u8 lena;
const u8 *epos;
wpa_hexdump(2, "SAE: Possible elements at the end of the frame", *pos,
end - *pos);
if (sae_is_password_id_elem(*pos, e... | static int sae_parse_password_identifier(struct sae_data *sae, const u8 **pos,
const u8 *end) {
const u8 *epos;
u8 len;
wpa_hexdump(MSG_DEBUG, "SAE: Possible elements at the end of the frame", *pos,
end - *pos);
if (!sae_is_password_id_elem(*pos, end)) {
... | sae_parse_password_identifier | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_parse_rejected_groups(sae_data *sae, const u8 **pos, const u8 *end) {
sae_temporary_data *tmp;
u8 len;
u8 lena;
const u8 *epos;
wpa_hexdump(2, "SAE: Possible elements at the end of the frame", *pos,
end - *pos);
if (!sae_is_rejected_groups_elem(*pos, end))
return 0;
len = (*pos)... | static int sae_parse_rejected_groups(struct sae_data *sae, const u8 **pos,
const u8 *end) {
const u8 *epos;
u8 len;
wpa_hexdump(MSG_DEBUG, "SAE: Possible elements at the end of the frame", *pos,
end - *pos);
if (!sae_is_rejected_groups_elem(*pos, end))
ret... | sae_parse_rejected_groups | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_parse_token_container(sae_data *sae, const u8 *pos, const u8 *end,
const u8 **token, size_t *token_len) {
wpa_hexdump(2, "SAE: Possible elements at the end of the frame", pos,
end - pos);
if (sae_is_token_container_elem(pos, end)) {
*token = pos + 3;
*to... | static void sae_parse_token_container(struct sae_data *sae, const u8 *pos,
const u8 *end, const u8 **token,
size_t *token_len) {
wpa_hexdump(MSG_DEBUG, "SAE: Possible elements at the end of the frame", pos,
end - pos);
if (!sa... | sae_parse_token_container | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_pick_next_group(hostapd_data *hapd, sta_info *sta) {
int i;
int *groups;
sae_data *sae;
int default_groups[2];
unsigned long v6;
v6 = __readfsqword(0x28u);
sae = sta->sae;
groups = hapd->conf->sae_groups;
default_groups[0] = 19;
default_groups[1] = 0;
if (sae->state == sae_state_SAE_COMM... | static void sae_pick_next_group(struct hostapd_data *hapd,
struct sta_info *sta) {
struct sae_data *sae = sta->sae;
int i, *groups = hapd->conf->sae_groups;
int default_groups[] = {19, 0};
if (sae->state != SAE_COMMITTED)
return;
wpa_printf(MSG_DEBUG, "SAE: Previously sel... | sae_pick_next_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_prepare_commit(const u8 *addr1, const u8 *addr2, const u8 *password,
size_t password_len, sae_data *sae) {
if (!sae->tmp ||
sae->tmp->ec &&
sae_derive_pwe_ecc(sae, addr1, addr2, password, password_len) < 0 ||
sae->tmp->dh &&
sae_derive_pwe_ffc(sae, addr1,... | int sae_prepare_commit(const u8 *addr1, const u8 *addr2, const u8 *password,
size_t password_len, struct sae_data *sae) {
if (sae->tmp == NULL ||
(sae->tmp->ec &&
sae_derive_pwe_ecc(sae, addr1, addr2, password, password_len) < 0) ||
(sae->tmp->dh &&
sae_derive_pwe_ffc(... | sae_prepare_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_prepare_commit_pt(sae_data *sae, const sae_pt *pt, const u8 *addr1,
const u8 *addr2, int *rejected_groups,
const sae_pk *pk) {
sae_temporary_data *tmp;
sae_temporary_data *v8;
int i;
int count;
wpabuf *groups;
if (!sae->tmp)
return -1;
while... | int sae_prepare_commit_pt(struct sae_data *sae, const struct sae_pt *pt,
const u8 *addr1, const u8 *addr2,
int *rejected_groups, const struct sae_pk *pk) {
if (!sae->tmp)
return -1;
while (pt) {
if (pt->group == sae->group)
break;
pt = pt->next;... | sae_prepare_commit_pt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_process_commit(sae_data *sae) {
u8 k[520];
unsigned long v3;
v3 = __readfsqword(0x28u);
if (!sae->tmp || sae->tmp->ec && sae_derive_k_ecc(sae, k) < 0 ||
sae->tmp->dh && sae_derive_k_ffc(sae, k) < 0 ||
sae_derive_keys(sae, k) < 0) {
return -1;
} else {
return 0;
}
} | int sae_process_commit(struct sae_data *sae) {
u8 k[SAE_MAX_PRIME_LEN];
if (sae->tmp == NULL || (sae->tmp->ec && sae_derive_k_ecc(sae, k) < 0) ||
(sae->tmp->dh && sae_derive_k_ffc(sae, k) < 0) ||
sae_derive_keys(sae, k) < 0)
return -1;
return 0;
} | sae_process_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_pwd_seed(size_t hash_len, const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier, u8 *pwd_seed) {
size_t num_elem;
const u8 *addr[2];
size_t len[3];
unsigned long v15;
v15 = __readfsqword(0x28u);
addr[0] = password;
len[0... | static int sae_pwd_seed(size_t hash_len, const u8 *ssid, size_t ssid_len,
const u8 *password, size_t password_len,
const char *identifier, u8 *pwd_seed) {
const u8 *addr[2];
size_t len[2];
size_t num_elem;
addr[0] = password;
len[0] = password_len;
num_elem =... | sae_pwd_seed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_pwd_seed_key(const u8 *addr1, const u8 *addr2, u8 *key) {
wpa_printf(2,
"SAE: PWE derivation - addr1=%02x:%02x:%02x:%02x:%02x:%02x "
"addr2=%02x:%02x:%02x:%02x:%02x:%02x",
*addr1, addr1[1], addr1[2], addr1[3], addr1[4], addr1[5], *addr2,
addr2[1], addr2[2],... | static void sae_pwd_seed_key(const u8 *addr1, const u8 *addr2, u8 *key) {
wpa_printf(MSG_DEBUG, "SAE: PWE derivation - addr1=" MACSTR " addr2=" MACSTR,
MAC2STR(addr1), MAC2STR(addr2));
if (os_memcmp(addr1, addr2, ETH_ALEN) > 0) {
os_memcpy(key, addr1, ETH_ALEN);
os_memcpy(key + ETH_ALEN, addr2,... | sae_pwd_seed_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_set_group(sae_data *sae, int group) {
sae_temporary_data *tmp;
if (dragonfly_suitable_group(group, 0)) {
sae_clear_data(sae);
sae->tmp = (sae_temporary_data *)os_zalloc(0xF8u);
tmp = sae->tmp;
if (tmp) {
tmp->ec = crypto_ec_init(group);
if (tmp->ec) {
wpa_printf(2, "SAE:... | int sae_set_group(struct sae_data *sae, int group) {
struct sae_temporary_data *tmp;
#ifdef CONFIG_TESTING_OPTIONS
#else
if (!dragonfly_suitable_group(group, 0)) {
wpa_printf(MSG_DEBUG, "SAE: Reject unsuitable group %d", group);
return -1;
}
#endif
sae_clear_data(sae);
tmp = sae->tmp = os_zalloc(si... | sae_set_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_set_retransmit_timer(hostapd_data *hapd, sta_info *sta) {
if ((hapd->conf->mesh & 1) != 0) {
eloop_cancel_timeout((eloop_timeout_handler)auth_sae_retransmit_timer, hapd,
sta);
eloop_register_timeout(0, 1000 * hapd->dot11RSNASAERetransPeriod,
(eloop_... | static void sae_set_retransmit_timer(struct hostapd_data *hapd,
struct sta_info *sta) {
if (!(hapd->conf->mesh & MESH_ENABLED))
return;
eloop_cancel_timeout(auth_sae_retransmit_timer, hapd, sta);
eloop_register_timeout(0, hapd->dot11RSNASAERetransPeriod * 1000,
... | sae_set_retransmit_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_set_state(sta_info *sta, sae_state state, const char *reason) {
int v3;
int v4;
int v5;
int v6;
const char *v7;
const char *v8;
int v9;
int v10;
v3 = sta->addr[5];
v4 = sta->addr[4];
v5 = sta->addr[3];
v6 = sta->addr[2];
v10 = sta->addr[1];
v9 = sta->addr[0];
v7 = sae_state_txt(s... | static void sae_set_state(struct sta_info *sta, enum sae_state state,
const char *reason) {
wpa_printf(MSG_DEBUG, "SAE: State %s -> %s for peer " MACSTR " (%s)",
sae_state_txt(sta->sae->state), sae_state_txt(state),
MAC2STR(sta->addr), reason);
sta->sae->state = s... | sae_set_state | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_sm_step(hostapd_data *hapd, sta_info *sta, const u8 *bssid,
u16 auth_transaction, u16 status_code, int allow_reuse,
int *sta_removed) {
const char *v8;
sae_state state;
bool v10;
int ret;
int reta;
int retb;
int retc;
int retd;
int rete;
int retf;
int retg;
... | static int sae_sm_step(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *bssid, u16 auth_transaction, u16 status_code,
int allow_reuse, int *sta_removed) {
int ret;
*sta_removed = 0;
if (auth_transaction != 1 && auth_transaction != 2)
return WLAN_STATUS... | sae_sm_step | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sae_sme_send_external_auth_status(hostapd_data *hapd, sta_info *sta,
u16 status) {
external_auth params;
unsigned long v5;
v5 = __readfsqword(0x28u);
memset(¶ms, 0, sizeof(params));
params.status = status;
params.bssid = sta->addr;
if (!status && sta->sae &... | static void sae_sme_send_external_auth_status(struct hostapd_data *hapd,
struct sta_info *sta,
u16 status) {
struct external_auth params;
os_memset(¶ms, 0, sizeof(params));
params.status = status;
params.bssid = sta... | sae_sme_send_external_auth_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *sae_state_txt(sae_state state) {
if (state == sae_state_SAE_ACCEPTED)
return "Accepted";
if ((unsigned int)state > sae_state_SAE_ACCEPTED)
return "?";
if (state == sae_state_SAE_CONFIRMED)
return "Confirmed";
if (state)
return "Committed";
return "Nothing";
} | const char *sae_state_txt(enum sae_state state) {
switch (state) {
case SAE_NOTHING:
return "Nothing";
case SAE_COMMITTED:
return "Committed";
case SAE_CONFIRMED:
return "Confirmed";
case SAE_ACCEPTED:
return "Accepted";
}
return "?";
} | sae_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_status_success(hostapd_data *hapd, u16 status_code) {
int sae_pwe;
int id_in_use;
sae_pwe = hapd->conf->sae_pwe;
id_in_use = hostapd_sae_pw_id_in_use(hapd->conf);
if (id_in_use != 2 || sae_pwe == 3) {
if (id_in_use == 1 && !sae_pwe)
sae_pwe = 2;
} else {
sae_pwe = 1;
}
return (!sa... | static int sae_status_success(struct hostapd_data *hapd, u16 status_code) {
int sae_pwe = hapd->conf->sae_pwe;
int id_in_use;
bool sae_pk = false;
id_in_use = hostapd_sae_pw_id_in_use(hapd->conf);
if (id_in_use == 2 && sae_pwe != 3)
sae_pwe = 1;
else if (id_in_use == 1 && sae_pwe == 0)
sae_pwe = 2;... | sae_status_success | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_test_pwd_seed_ecc(sae_data *sae, const u8 *pwd_seed, const u8 *prime,
const u8 *qr, const u8 *qnr, u8 *pwd_value) {
unsigned int cmp_prime;
unsigned int in_range;
int res;
size_t bits;
const crypto_bignum *x_cand;
const crypto_bignum *y_sqr;
wpa_hexdump_key(2, "SAE: pwd-... | static int sae_test_pwd_seed_ecc(struct sae_data *sae, const u8 *pwd_seed,
const u8 *prime, const u8 *qr, const u8 *qnr,
u8 *pwd_value) {
struct crypto_bignum *y_sqr, *x_cand;
int res;
size_t bits;
int cmp_prime;
unsigned int in_range;
wpa_h... | sae_test_pwd_seed_ecc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_test_pwd_seed_ffc(sae_data *sae, const u8 *pwd_seed,
crypto_bignum *pwe) {
unsigned int v4;
unsigned int is_zero;
u8 v6;
u8 v7;
u8 pwd_value_valid;
int res;
u8 resa;
u8 resb;
unsigned int is_val;
const crypto_bignum *b;
size_t bits;
const crypto_bignum *a;
u8 ... | static int sae_test_pwd_seed_ffc(struct sae_data *sae, const u8 *pwd_seed,
struct crypto_bignum *pwe) {
u8 pwd_value[SAE_MAX_PRIME_LEN];
size_t bits = sae->tmp->prime_len * 8;
u8 exp[1];
struct crypto_bignum *a, *b = NULL;
int res, is_val;
u8 pwd_value_valid;
wpa_hexdump_... | sae_test_pwd_seed_ffc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_write_commit(sae_data *sae, wpabuf *buf, const wpabuf *token,
const char *identifier) {
size_t v5;
const void *v6;
u8 v7;
u8 v8;
u8 v9;
u8 *pos;
u8 *posa;
u8 *posb;
if (!sae->tmp)
return -1;
wpabuf_put_le16_1(buf, sae->group);
if ((*((_BYTE *)sae + 82) & 1) == 0 &... | int sae_write_commit(struct sae_data *sae, struct wpabuf *buf,
const struct wpabuf *token, const char *identifier) {
u8 *pos;
if (sae->tmp == NULL)
return -1;
wpabuf_put_le16(buf, sae->group);
if (!sae->h2e && token) {
wpabuf_put_buf(buf, token);
wpa_hexdump(MSG_DEBUG, "SAE: A... | sae_write_commit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sae_write_confirm(sae_data *sae, wpabuf *buf) {
u8 *v3;
u8 *v4;
int res;
size_t hash_len;
const u8 *sc;
if (!sae->tmp)
return -1;
hash_len = sae->tmp->kck_len;
if (sae->send_confirm != 0xFFFF)
++sae->send_confirm;
sc = (const u8 *)wpabuf_put(buf, 0);
wpabuf_put_le16_1(buf, sae->send_con... | int sae_write_confirm(struct sae_data *sae, struct wpabuf *buf) {
const u8 *sc;
size_t hash_len;
int res;
if (sae->tmp == NULL)
return -1;
hash_len = sae->tmp->kck_len;
if (sae->send_confirm < 0xffff)
sae->send_confirm++;
sc = wpabuf_put(buf, 0);
wpabuf_put_le16(buf, sae->send_confirm);
if... | sae_write_confirm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *scan_state_str(scan_states scan_state) {
const char *result;
switch (scan_state) {
case scan_states_NO_SCAN:
result = "NO_SCAN";
break;
case scan_states_SCAN_REQUESTED:
result = "SCAN_REQUESTED";
break;
case scan_states_SCAN_STARTED:
result = "SCAN_STARTED";
break;
case ... | static const char *scan_state_str(enum scan_states scan_state) {
switch (scan_state) {
case NO_SCAN:
return "NO_SCAN";
case SCAN_REQUESTED:
return "SCAN_REQUESTED";
case SCAN_STARTED:
return "SCAN_STARTED";
case SCAN_COMPLETED:
return "SCAN_COMPLETED";
case SCAN_ABORTED:
return "SCAN_ABO... | scan_state_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int send_and_recv(nl80211_global *global, nl_sock *nl_handle, nl_msg *msg,
int (*valid_handler)(nl_msg *, void *), void *valid_data,
int (*ack_handler_custom)(nl_msg *, void *), void *ack_data) {
int fd;
int v9;
const char *v10;
const char *v11;
const char *v12;
int err;
... | static int send_and_recv(struct nl80211_global *global,
struct nl_sock *nl_handle, struct nl_msg *msg,
int (*valid_handler)(struct nl_msg *, void *),
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *),
... | send_and_recv | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int send_and_recv_msgs(wpa_driver_nl80211_data *drv, nl_msg *msg,
int (*valid_handler)(nl_msg *, void *), void *valid_data,
int (*ack_handler_custom)(nl_msg *, void *),
void *ack_data) {
return send_and_recv(drv->global, drv->global->nl, msg, valid_... | int send_and_recv_msgs(struct wpa_driver_nl80211_data *drv, struct nl_msg *msg,
int (*valid_handler)(struct nl_msg *, void *),
void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *),
void *ack_data) {
return send... | send_and_recv_msgs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int send_and_recv_msgs_connect_handle(wpa_driver_nl80211_data *drv, nl_msg *msg,
i802_bss *bss, int set_owner) {
nl_sock *nl_connect;
nl_connect = get_connect_handle(bss);
if (nl_connect)
return send_and_recv_msgs_owner(
drv, msg, nl_connect, set_owner,
(... | static int
send_and_recv_msgs_connect_handle(struct wpa_driver_nl80211_data *drv,
struct nl_msg *msg, struct i802_bss *bss,
int set_owner) {
struct nl_sock *nl_connect = get_connect_handle(bss);
if (nl_connect)
return send_and_recv_msgs_owner(... | send_and_recv_msgs_connect_handle | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int send_and_recv_msgs_owner(wpa_driver_nl80211_data *drv, nl_msg *msg,
nl_sock *handle, int set_owner,
int (*valid_handler)(nl_msg *, void *),
void *valid_data,
int (*ack_handler_custom)(nl_msg *, void *... | static int send_and_recv_msgs_owner(
struct wpa_driver_nl80211_data *drv, struct nl_msg *msg,
struct nl_sock *handle, int set_owner,
int (*valid_handler)(struct nl_msg *, void *), void *valid_data,
int (*ack_handler_custom)(struct nl_msg *, void *), void *ack_data) {
if (!msg)
return -ENOMEM;
i... | send_and_recv_msgs_owner | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 send_assoc_resp(hostapd_data *hapd, sta_info *sta, const u8 *addr,
u16 status_code, int reassoc, const u8 *ies, size_t ies_len,
int rssi, int omit_rsnxe) {
short v9;
short v10;
u8 *v11;
u8 *v12;
u8 *v13;
u8 *v14;
u8 *v15;
size_t v16;
const void *v17;
u8 *v... | static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *addr, u16 status_code, int reassoc,
const u8 *ies, size_t ies_len, int rssi,
int omit_rsnxe) {
int send_len;
u8 *buf;
size_t buflen;
struct ieee8... | send_assoc_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int send_auth_reply(hostapd_data *hapd, sta_info *sta, const u8 *dst,
const u8 *bssid, u16 auth_alg, u16 auth_transaction,
u16 resp, const u8 *ies, size_t ies_len, const char *dbg) {
int reply_res;
u8 *buf;
reply_res = 1;
buf = (u8 *)os_zalloc(ies_len + 30);
if (!buf)
... | static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *dst, const u8 *bssid, u16 auth_alg,
u16 auth_transaction, u16 resp, const u8 *ies,
size_t ies_len, const char *dbg) {
struct ieee80211_mgmt *reply;
u... | send_auth_reply | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void send_deauth(hostapd_data *hapd, const u8 *addr, u16 reason_code) {
int *v3;
char *v4;
ieee80211_mgmt reply;
unsigned long v7;
v7 = __readfsqword(0x28u);
memset(&reply, 0, sizeof(reply));
reply.frame_control = 192;
*(_DWORD *)reply.da = *(_DWORD *)addr;
*(_WORD *)&reply.da[4] = *((_WORD *)addr + ... | static void send_deauth(struct hostapd_data *hapd, const u8 *addr,
u16 reason_code) {
int send_len;
struct ieee80211_mgmt reply;
os_memset(&reply, 0, sizeof(reply));
reply.frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, WLAN_FC_STYPE_DEAUTH);
os_memcpy(reply.da, addr, ETH_ALEN);
os_... | send_deauth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void send_scan_event(wpa_driver_nl80211_data *drv, int aborted, nlattr **tb,
int external_scan) {
const u8 *v4;
int v5;
const char *v6;
int u32;
u64 u64;
const void *v9;
int rem;
int num_freqs;
int res;
nlattr *nl;
char *pos;
scan_info *info;
wpa_driver_scan_ssid *s;
cha... | static void send_scan_event(struct wpa_driver_nl80211_data *drv, int aborted,
struct nlattr *tb[], int external_scan) {
union wpa_event_data event;
struct nlattr *nl;
int rem;
struct scan_info *info;
#define MAX_REPORT_FREQS 100
int freqs[MAX_REPORT_FREQS];
int num_freqs = 0;
... | send_scan_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_add(const char *group_id, char *buf, size_t buflen) {
u32 id;
fst_group *g;
fst_session *s;
g = get_fst_group_by_id(group_id);
if (g) {
s = fst_session_create(g);
if (s) {
id = fst_session_get_id(s);
return snprintf(buf, buflen, "%u\n", id);
} else {
wpa_printf(5, "F... | static int session_add(const char *group_id, char *buf, size_t buflen) {
struct fst_group *g;
struct fst_session *s;
g = get_fst_group_by_id(group_id);
if (!g) {
fst_printf(MSG_WARNING, "CTRL: Cannot find group '%s'", group_id);
return os_snprintf(buf, buflen, "FAIL\n");
}
s = fst_session_create(g... | session_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_get(const char *session_id, char *buf, size_t buflen) {
fst_session_state state;
const char *v5;
u32 llt;
const char *name_3;
const char *v8;
u32 id;
fst_session *s;
const u8 *old_peer_addr;
const u8 *new_peer_addr;
fst_iface *new_iface;
fst_iface *old_iface;
id = strtoul(session_id... | static int session_get(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
struct fst_iface *new_iface, *old_iface;
const u8 *old_peer_addr, *new_peer_addr;
u32 id;
id = strtoul(session_id, NULL, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Canno... | session_get | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_initiate(const char *session_id, char *buf, size_t buflen) {
u32 id;
fst_session *s;
id = strtoul(session_id, 0, 0);
s = fst_session_get_by_id(id);
if (s) {
if (fst_session_initiate_setup(s)) {
wpa_printf(4, "FST: CTRL: Cannot initiate session %u", id);
return snprintf(buf, buflen... | static int session_initiate(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
u32 id;
id = strtoul(session_id, NULL, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, buflen, "FAIL\n");
}
if... | session_initiate | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_remove(const char *session_id, char *buf, size_t buflen) {
u32 id;
fst_session *s;
fst_group *g;
id = strtoul(session_id, 0, 0);
s = fst_session_get_by_id(id);
if (s) {
g = fst_session_get_group(s);
fst_session_reset(s);
fst_session_delete(s);
fst_group_delete_if_empty(g);
r... | static int session_remove(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
struct fst_group *g;
u32 id;
id = strtoul(session_id, NULL, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, buflen,... | session_remove | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_respond(const char *session_id, char *buf, size_t buflen) {
int v4;
u32 id;
char *p;
fst_session *s;
unsigned long v9;
v9 = __readfsqword(0x28u);
id = strtoul(session_id, &p, 0);
s = fst_session_get_by_id(id);
if (!s) {
wpa_printf(4, "FST: CTRL: Cannot find session %u", id);
retur... | static int session_respond(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
char *p;
u32 id;
u8 status_code;
id = strtoul(session_id, &p, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, bu... | session_respond | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_set(const char *session_id, char *buf, size_t buflen) {
const char *v4;
int ret;
u32 id;
char *p;
fst_session *s;
char *q;
unsigned long v11;
v11 = __readfsqword(0x28u);
id = strtoul(session_id, &p, 0);
s = fst_session_get_by_id(id);
if (!s) {
wpa_printf(4, "FST: CTRL: Cannot find... | static int session_set(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
char *p, *q;
u32 id;
int ret;
id = strtoul(session_id, &p, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, buflen, "... | session_set | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_teardown(const char *session_id, char *buf, size_t buflen) {
u32 id;
fst_session *s;
id = strtoul(session_id, 0, 0);
s = fst_session_get_by_id(id);
if (s) {
if (fst_session_tear_down_setup(s)) {
wpa_printf(4, "FST: CTRL: Cannot tear down session %u", id);
return snprintf(buf, bufl... | static int session_teardown(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
u32 id;
id = strtoul(session_id, NULL, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, buflen, "FAIL\n");
}
if... | session_teardown | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int session_transfer(const char *session_id, char *buf, size_t buflen) {
u32 id;
fst_session *s;
id = strtoul(session_id, 0, 0);
s = fst_session_get_by_id(id);
if (s) {
if (fst_session_initiate_switch(s)) {
wpa_printf(4, "FST: CTRL: Cannot initiate ST for session %u", id);
return snprintf(buf... | static int session_transfer(const char *session_id, char *buf, size_t buflen) {
struct fst_session *s;
u32 id;
id = strtoul(session_id, NULL, 0);
s = fst_session_get_by_id(id);
if (!s) {
fst_printf(MSG_WARNING, "CTRL: Cannot find session %u", id);
return os_snprintf(buf, buflen, "FAIL\n");
}
if... | session_transfer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void set_anqp_req(unsigned int bit, const char *name, int local,
anqp_query_info *qi) {
qi->request |= bit;
if (local)
wpa_printf(2, "ANQP: %s (local)", name);
else
wpa_printf(2, "ANQP: %s not available", name);
} | static void set_anqp_req(unsigned int bit, const char *name, int local,
struct anqp_query_info *qi) {
qi->request |= bit;
if (local) {
wpa_printf(MSG_DEBUG, "ANQP: %s (local)", name);
} else {
wpa_printf(MSG_DEBUG, "ANQP: %s not available", name);
}
} | set_anqp_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int set_beacon_data(nl_msg *msg, beacon_data *settings) {
if (settings->head &&
(unsigned int)nla_put(msg, 14, (unsigned int)settings->head_len,
settings->head) ||
settings->tail &&
(unsigned int)nla_put(msg, 15, (unsigned int)settings->tail_len,
... | static int set_beacon_data(struct nl_msg *msg, struct beacon_data *settings) {
if ((settings->head && nla_put(msg, NL80211_ATTR_BEACON_HEAD,
settings->head_len, settings->head)) ||
(settings->tail && nla_put(msg, NL80211_ATTR_BEACON_TAIL,
setting... | set_beacon_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int set_dfs_state(hostapd_iface *iface, int freq, int ht_enabled,
int chan_offset, int chan_width, int cf1, int cf2,
u32 state) {
int n_chans;
int i;
int frequency;
int frequency2;
int ret;
hostapd_hw_modes *mode;
n_chans = 1;
frequency = freq;
frequency2 = 0;
re... | static int set_dfs_state(struct hostapd_iface *iface, int freq, int ht_enabled,
int chan_offset, int chan_width, int cf1, int cf2,
u32 state) {
int n_chans = 1, i;
struct hostapd_hw_modes *mode;
int frequency = freq;
int frequency2 = 0;
int ret = 0;
mode = ... | set_dfs_state | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int set_dfs_state_freq(hostapd_iface *iface, int freq, u32 state) {
int flag;
int i;
hostapd_channel_data *chan;
if (!iface->current_mode)
return 0;
wpa_printf(2, "set_dfs_state 0x%X for %d MHz", state, freq);
for (i = 0; i < iface->current_mode->num_channels; ++i) {
chan = &iface->current_mode->ch... | static int set_dfs_state_freq(struct hostapd_iface *iface, int freq,
u32 state) {
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan = NULL;
int i;
mode = iface->current_mode;
if (mode == NULL)
return 0;
wpa_printf(MSG_DEBUG, "set_dfs_state 0x%X for %d MHz",... | set_dfs_state_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void set_disable_ht40(ieee80211_ht_capabilities *htcaps, int disabled) {
if (disabled)
htcaps->ht_capabilities_info &= 0xFFBDu;
else
htcaps->ht_capabilities_info |= 0x42u;
} | void set_disable_ht40(struct ieee80211_ht_capabilities *htcaps, int disabled) {
le16 msk = host_to_le16(HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET |
HT_CAP_INFO_SHORT_GI40MHZ);
if (disabled)
htcaps->ht_capabilities_info &= ~msk;
else
htcaps->ht_capabilities_info |= msk;
} | set_disable_ht40 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void set_disassoc_timer(hostapd_data *hapd, sta_info *sta, int disassoc_timer) {
int beacon_int;
wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
beacon_int = hapd->iconf->beacon_int;
if (!hapd->iconf->beacon_int)
beacon_int = 100;
wpa_printf(
2, "Disassociation timer for %02x:%02x:%02x:%02x:%02x:... | static void set_disassoc_timer(struct hostapd_data *hapd, struct sta_info *sta,
int disassoc_timer) {
int timeout, beacon_int;
wpa_auth_pmksa_remove(hapd->wpa_auth, sta->addr);
beacon_int = hapd->iconf->beacon_int;
if (beacon_int < 1)
beacon_int = 100;
timeout = disassoc_... | set_disassoc_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 set_sta_vht_opmode(hostapd_data *hapd, sta_info *sta,
const u8 *vht_oper_notif) {
if (vht_oper_notif) {
sta->flags |= 0x100000u;
sta->vht_opmode = *vht_oper_notif;
} else {
sta->flags &= ~0x100000u;
}
return 0;
} | u16 set_sta_vht_opmode(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *vht_oper_notif) {
if (!vht_oper_notif) {
sta->flags &= ~WLAN_STA_VHT_OPMODE_ENABLED;
return WLAN_STATUS_SUCCESS;
}
sta->flags |= WLAN_STA_VHT_OPMODE_ENABLED;
sta->vht_opmode = *vht_oper_notif;
ret... | set_sta_vht_opmode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int setup_interface(hostapd_iface *iface) {
size_t i;
hostapd_data *hapd;
const char *phy;
char country[4];
char previous_country[4];
unsigned long v7;
v7 = __readfsqword(0x28u);
hapd = *iface->bss;
*((_BYTE *)iface + 96) &= ~1u;
if (!iface->phy[0]) {
phy = hostapd_drv_get_radio_name(hapd);
... | static int setup_interface(struct hostapd_iface *iface) {
struct hostapd_data *hapd = iface->bss[0];
size_t i;
iface->driver_ap_teardown = 0;
if (!iface->phy[0]) {
const char *phy = hostapd_drv_get_radio_name(hapd);
if (phy) {
wpa_printf(MSG_DEBUG, "phy: %s", phy);
os_strlcpy(iface->phy, p... | setup_interface | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int setup_interface2(hostapd_iface *iface) {
int ret;
int reta;
u8 ch_width;
*((_BYTE *)iface + 72) &= ~1u;
if (hostapd_get_hw_features(iface))
return hostapd_setup_interface_complete(iface, 0);
if (configured_fixed_chan_to_freq(iface) >= 0) {
if (iface->conf->op_class) {
ch_width = op_class_... | static int setup_interface2(struct hostapd_iface *iface) {
iface->wait_channel_update = 0;
if (hostapd_get_hw_features(iface)) {
} else {
int ret;
ret = configured_fixed_chan_to_freq(iface);
if (ret < 0)
goto fail;
if (iface->conf->op_class) {
int ch_width;
ch_width = op_cla... | setup_interface2 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void sha1_transform(u32 *state, const u8 *data) {
SHA_CTX context;
unsigned long v3;
v3 = __readfsqword(0x28u);
memset(&context, 0, sizeof(context));
context.h0 = *state;
context.h1 = state[1];
context.h2 = state[2];
context.h3 = state[3];
context.h4 = state[4];
SHA1_Transform(&context, data);
*s... | static void sha1_transform(u32 *state, const u8 data[64]) {
SHA_CTX context;
os_memset(&context, 0, sizeof(context));
#if defined(OPENSSL_IS_BORINGSSL) && !defined(ANDROID)
context.h[0] = state[0];
context.h[1] = state[1];
context.h[2] = state[2];
context.h[3] = state[3];
context.h[4] = state[4];
SHA1_T... | sha1_transform | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
const u8 *data, size_t data_len, u8 *buf,
size_t buf_len_bits) {
u16 counter;
size_t pos;
size_t buf_len;
const u8 *addr[4];
size_t len[5];
u8 counter_le[2];
u8 length_le[2];
u8 hash[40];
unsi... | int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
const u8 *data, size_t data_len, u8 *buf,
size_t buf_len_bits) {
u16 counter = 1;
size_t pos, plen;
u8 hash[SHA256_MAC_LEN];
const u8 *addr[4];
size_t len[4];
u8 counter_le[2], length_le[2];
size_... | sha256_prf_bits | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.