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 |
|---|---|---|---|---|---|---|---|
void dpp_free_asymmetric_key(dpp_asymmetric_key *key) {
dpp_asymmetric_key *next;
while (key) {
next = key->next;
crypto_ec_key_deinit(key->csign);
crypto_ec_key_deinit(key->pp_key);
str_clear_free(key->config_template);
str_clear_free(key->connector_template);
free(key);
key = next;
... | void dpp_free_asymmetric_key(struct dpp_asymmetric_key *key) {
while (key) {
struct dpp_asymmetric_key *next = key->next;
crypto_ec_key_deinit(key->csign);
crypto_ec_key_deinit(key->pp_key);
str_clear_free(key->config_template);
str_clear_free(key->connector_template);
os_free(key);
key =... | dpp_free_asymmetric_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_free_reconfig_id(dpp_reconfig_id *id) {
if (id) {
crypto_ec_point_deinit(id->e_id, 1);
crypto_ec_key_deinit(id->csign);
crypto_ec_key_deinit(id->a_nonce);
crypto_ec_key_deinit(id->e_prime_id);
crypto_ec_key_deinit(id->pp_key);
crypto_ec_deinit(id->ec);
free(id);
}
} | void dpp_free_reconfig_id(struct dpp_reconfig_id *id) {
if (id) {
crypto_ec_point_deinit(id->e_id, 1);
crypto_ec_key_deinit(id->csign);
crypto_ec_key_deinit(id->a_nonce);
crypto_ec_key_deinit(id->e_prime_id);
crypto_ec_key_deinit(id->pp_key);
crypto_ec_deinit(id->ec);
os_free(id);
}
} | dpp_free_reconfig_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_gen_i_auth(dpp_authentication *auth, u8 *i_auth) {
u8 one;
int res;
wpabuf *pix;
wpabuf *prx;
wpabuf *bix;
wpabuf *brx;
size_t i;
size_t num_elem;
size_t nonce_len;
const u8 *addr[7];
size_t len[7];
unsigned long v14;
v14 = __readfsqword(0x28u);
pix = 0;
prx = 0;
bix = 0;
brx ... | int dpp_gen_i_auth(struct dpp_authentication *auth, u8 *i_auth) {
struct wpabuf *pix = NULL, *prx = NULL, *bix = NULL, *brx = NULL;
const u8 *addr[7];
size_t len[7];
size_t i, num_elem = 0;
size_t nonce_len;
u8 one = 1;
int res = -1;
nonce_len = auth->curve->nonce_len;
if (auth->initiator) {
pix... | dpp_gen_i_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_gen_r_auth(dpp_authentication *auth, u8 *r_auth) {
u8 zero;
int res;
wpabuf *pix;
wpabuf *prx;
wpabuf *bix;
wpabuf *brx;
size_t i;
size_t num_elem;
size_t nonce_len;
const u8 *addr[7];
size_t len[7];
unsigned long v14;
v14 = __readfsqword(0x28u);
num_elem = 0;
zero = 0;
res = -1... | int dpp_gen_r_auth(struct dpp_authentication *auth, u8 *r_auth) {
struct wpabuf *pix, *prx, *bix, *brx;
const u8 *addr[7];
size_t len[7];
size_t i, num_elem = 0;
size_t nonce_len;
u8 zero = 0;
int res = -1;
nonce_len = auth->curve->nonce_len;
if (auth->initiator) {
pix = crypto_ec_key_get_pubkey... | dpp_gen_r_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_gen_random(size_t len) {
unsigned char *v1;
wpabuf *key;
key = wpabuf_alloc(len);
if (!key || (v1 = (unsigned char *)wpabuf_put(key, len),
os_get_random(v1, len) < 0)) {
wpabuf_free(key);
key = 0;
}
wpa_hexdump_buf_key(2, "DPP: content-encryption key", key);
return key;... | static struct wpabuf *dpp_gen_random(size_t len) {
struct wpabuf *key;
key = wpabuf_alloc(len);
if (!key || os_get_random(wpabuf_put(key, len), len) < 0) {
wpabuf_free(key);
key = NULL;
}
wpa_hexdump_buf_key(MSG_DEBUG, "DPP: content-encryption key", key);
return key;
} | dpp_gen_random | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_reconfig_id *dpp_gen_reconfig_id(const u8 *csign_key, size_t csign_key_len,
const u8 *pp_key, size_t pp_key_len) {
int v4;
crypto_ec_key *csign;
crypto_ec_key *ppkey;
dpp_reconfig_id *id;
crypto_ec *ec;
crypto_bignum *bn;
const crypto_ec_point *e_id;
const crypto... | struct dpp_reconfig_id *dpp_gen_reconfig_id(const u8 *csign_key,
size_t csign_key_len,
const u8 *pp_key,
size_t pp_key_len) {
struct crypto_ec_key *csign = NULL, *ppkey = NULL;
struct ... | dpp_gen_reconfig_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_gen_uri(dpp_bootstrap_info *bi) {
const char *v2;
char *info;
const char *v4;
const char *v5;
char *chan;
const char *v7;
size_t len;
size_t lena;
size_t lenb;
char macstr[24];
unsigned long v13;
v13 = __readfsqword(0x28u);
len = 4;
if (bi->chan)
len = strlen(bi->chan) + 7;
if... | int dpp_gen_uri(struct dpp_bootstrap_info *bi) {
char macstr[ETH_ALEN * 2 + 10];
size_t len;
len = 4;
if (bi->chan)
len += 3 + os_strlen(bi->chan);
if (is_zero_ether_addr(bi->mac_addr))
macstr[0] = '\0';
else
os_snprintf(macstr, sizeof(macstr), "M:" COMPACT_MACSTR ";",
MAC2STR(b... | dpp_gen_uri | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *dpp_get_attr(const u8 *buf, size_t len, u16 req_id, u16 *ret_len) {
u16 id;
u16 alen;
const u8 *pos;
const u8 *posb;
const u8 *posa;
const u8 *end;
pos = buf;
end = &buf[len];
while (end - pos > 3) {
id = WPA_GET_LE16_6(pos);
posb = pos + 2;
alen = WPA_GET_LE16_6(posb);
posa... | const u8 *dpp_get_attr(const u8 *buf, size_t len, u16 req_id, u16 *ret_len) {
u16 id, alen;
const u8 *pos = buf, *end = buf + len;
while (end - pos >= 4) {
id = WPA_GET_LE16(pos);
pos += 2;
alen = WPA_GET_LE16(pos);
pos += 2;
if (alen > end - pos)
return NULL;
if (id == req_id) {
... | dpp_get_attr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *dpp_get_attr_next(const u8 *prev, const u8 *buf, size_t len,
u16 req_id, u16 *ret_len) {
u16 id;
u16 alen;
const u8 *pos;
const u8 *posb;
const u8 *posa;
const u8 *end;
end = &buf[len];
if (prev)
pos = &prev[WPA_GET_LE16_6(prev - 2)];
else
pos = buf;
wh... | static const u8 *dpp_get_attr_next(const u8 *prev, const u8 *buf, size_t len,
u16 req_id, u16 *ret_len) {
u16 id, alen;
const u8 *pos, *end = buf + len;
if (!prev)
pos = buf;
else
pos = prev + WPA_GET_LE16(prev - 2);
while (end - pos >= 4) {
id = WPA_GET_LE16(po... | dpp_get_attr_next | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *dpp_get_csr_attrs(const u8 *attrs, size_t attrs_len, size_t *len) {
u16 b64_len;
const u8 *b64;
unsigned long v7;
v7 = __readfsqword(0x28u);
b64 = dpp_get_attr(attrs, attrs_len, 0x101Fu, &b64_len);
if (b64)
return base64_decode((const char *)b64, b64_len, len);
else
return 0;
} | static u8 *dpp_get_csr_attrs(const u8 *attrs, size_t attrs_len, size_t *len) {
const u8 *b64;
u16 b64_len;
b64 = dpp_get_attr(attrs, attrs_len, DPP_ATTR_CSR_ATTR_REQ, &b64_len);
if (!b64)
return NULL;
return base64_decode((const char *)b64, b64_len, len);
} | dpp_get_csr_attrs | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
hostapd_hw_modes *dpp_get_mode(hostapd_data *hapd, hostapd_hw_mode mode) {
u16 i;
hostapd_hw_modes *modes;
modes = hapd->iface->hw_features;
for (i = 0; i < (unsigned short)hapd->iface->num_hw_features; ++i) {
if (mode == modes[i].mode && modes[i].num_channels && modes[i].channels)
return &modes[i];
... | static struct hostapd_hw_modes *dpp_get_mode(struct hostapd_data *hapd,
enum hostapd_hw_mode mode) {
struct hostapd_hw_modes *modes = hapd->iface->hw_features;
u16 num_modes = hapd->iface->num_hw_features;
u16 i;
for (i = 0; i < num_modes; i++) {
if (modes[i].mo... | dpp_get_mode | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_global_clear(dpp_global *dpp) {
if (dpp) {
dpp_bootstrap_del(dpp, 0);
dpp_configurator_del(dpp, 0);
dpp_tcp_init_flush(dpp);
dpp_relay_flush_controllers(dpp);
dpp_controller_stop(dpp);
}
} | void dpp_global_clear(struct dpp_global *dpp) {
if (!dpp)
return;
dpp_bootstrap_del(dpp, 0);
dpp_configurator_del(dpp, 0);
#ifdef CONFIG_DPP2
dpp_tcp_init_flush(dpp);
dpp_relay_flush_controllers(dpp);
dpp_controller_stop(dpp);
#endif
} | dpp_global_clear | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_global *dpp_global_init(dpp_global_config *config) {
dpp_global *dpp;
dpp = (dpp_global *)os_zalloc(0x68u);
if (!dpp)
return 0;
dpp->cb_ctx = config->cb_ctx;
dpp->remove_bi = config->remove_bi;
dl_list_init_3(&dpp->bootstrap);
dl_list_init_3(&dpp->configurator);
dl_list_init_3(&dpp->controllers... | struct dpp_global *dpp_global_init(struct dpp_global_config *config) {
struct dpp_global *dpp;
dpp = os_zalloc(sizeof(*dpp));
if (!dpp)
return NULL;
#ifdef CONFIG_DPP2
dpp->cb_ctx = config->cb_ctx;
dpp->remove_bi = config->remove_bi;
#endif
dl_list_init(&dpp->bootstrap);
dl_list_init(&dpp->configura... | dpp_global_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_ipaddr_to_sockaddr(sockaddr *addr, socklen_t *addrlen,
const hostapd_ip_addr *ipaddr, int port) {
uint16_t porta;
porta = port;
if (ipaddr->af != 2)
return -1;
memset(addr, 0, sizeof(sockaddr));
addr->sa_family = 2;
*(_DWORD *)&addr->sa_data[2] = ipaddr->u.v4.s_addr;
... | static int dpp_ipaddr_to_sockaddr(struct sockaddr *addr, socklen_t *addrlen,
const struct hostapd_ip_addr *ipaddr,
int port) {
struct sockaddr_in *dst;
#ifdef CONFIG_IPV6
struct sockaddr_in6 *dst6;
#endif
switch (ipaddr->af) {
case AF_INET:
... | dpp_ipaddr_to_sockaddr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_keygen(dpp_bootstrap_info *bi, const char *curve, const u8 *privkey,
size_t privkey_len) {
crypto_ec_key *v5;
size_t v6;
const u8 *v7;
size_t v8;
const void *v9;
size_t len;
char *base64;
char *pos;
wpabuf *der;
char *end;
unsigned long v17;
v17 = __readfsqword(0x28u);
... | int dpp_keygen(struct dpp_bootstrap_info *bi, const char *curve,
const u8 *privkey, size_t privkey_len) {
char *base64 = NULL;
char *pos, *end;
size_t len;
struct wpabuf *der = NULL;
bi->curve = dpp_get_curve_name(curve);
if (!bi->curve) {
wpa_printf(MSG_INFO, "DPP: Unsupported curve: %s... | dpp_keygen | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_nfc_update_bi_key(dpp_bootstrap_info *own_bi,
dpp_bootstrap_info *peer_bi) {
if (peer_bi->curve == own_bi->curve)
return 0;
wpa_printf(2, "DPP: Update own bootstrapping key to match peer curve from "
"NFC handover");
crypto_ec_key_deinit(own_bi->pubkey);
own... | static int dpp_nfc_update_bi_key(struct dpp_bootstrap_info *own_bi,
struct dpp_bootstrap_info *peer_bi) {
if (peer_bi->curve == own_bi->curve)
return 0;
wpa_printf(MSG_DEBUG, "DPP: Update own bootstrapping key to match peer curve "
"from NFC handover");
... | dpp_nfc_update_bi_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src,
unsigned int freq, const u8 *hash) {
char hex[72];
unsigned long v8;
v8 = __readfsqword(0x28u);
wpa_snprintf_hex(hex, 0x41u, hash, 0x20u);
wpa_msg(
msg_ctx, 3,
"DPP-CHIRP-RX id=%d src=%02x:%02x:%02... | void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src,
unsigned int freq, const u8 *hash) {
char hex[SHA256_MAC_LEN * 2 + 1];
wpa_snprintf_hex(hex, sizeof(hex), hash, SHA256_MAC_LEN);
wpa_msg(msg_ctx, MSG_INFO,
DPP_EVENT_CHIRP_RX "id=%d src=" MACSTR " freq=%... | dpp_notify_chirp_received | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_conf_obj(dpp_authentication *auth, const u8 *conf_obj,
u16 conf_obj_len) {
size_t v4;
const void *v5;
size_t v6;
unsigned int num_conf_obj;
size_t ssid_len;
const void *v9;
int ret;
int legacy;
json_token *token;
json_token *tokena;
json_token *tokenb;
wpabuf... | static int dpp_parse_conf_obj(struct dpp_authentication *auth,
const u8 *conf_obj, u16 conf_obj_len) {
int ret = -1;
struct json_token *root, *token, *discovery, *cred;
struct dpp_config_obj *conf;
struct wpabuf *ssid64 = NULL;
int legacy;
root = json_parse((const char *)conf_... | dpp_parse_conf_obj | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_cred_dot1x(dpp_authentication *auth, dpp_config_obj *conf,
json_token *cred) {
size_t v4;
json_token *ent;
json_token *name;
ent = json_get_member(cred, "entCreds");
if (ent && ent->type == json_type_JSON_OBJECT) {
conf->certbag = json_get_member_base64(ent, "certBa... | static int dpp_parse_cred_dot1x(struct dpp_authentication *auth,
struct dpp_config_obj *conf,
struct json_token *cred) {
struct json_token *ent, *name;
ent = json_get_member(cred, "entCreds");
if (!ent || ent->type != JSON_OBJECT) {
dpp_auth_fai... | dpp_parse_cred_dot1x | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_asymmetric_key *dpp_parse_dpp_asymmetric_key_package(const u8 *key_pkg,
size_t key_pkg_len) {
const u8 *pos;
dpp_asymmetric_key *first;
dpp_asymmetric_key *last;
const u8 *end;
dpp_asymmetric_key *key;
asn1_hdr hdr;
unsigned long v9;
v9 = __r... | static struct dpp_asymmetric_key *
dpp_parse_dpp_asymmetric_key_package(const u8 *key_pkg, size_t key_pkg_len) {
struct asn1_hdr hdr;
const u8 *pos = key_pkg, *end = key_pkg + key_pkg_len;
struct dpp_asymmetric_key *first = NULL, *last = NULL, *key;
wpa_hexdump_key(MSG_MSGDUMP, "DPP: DPPAsymmetricKeyPackage", ... | dpp_parse_dpp_asymmetric_key_package | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_encrypted_content_info(const u8 *pos, const u8 *end,
dpp_enveloped_data *data) {
const u8 *enda;
const u8 *posa;
asn1_hdr hdr;
asn1_oid oid;
char buf[88];
unsigned long v10;
posa = pos;
v10 = __readfsqword(0x28u);
if (asn1_get_sequence(pos, end - pos... | static int dpp_parse_encrypted_content_info(const u8 *pos, const u8 *end,
struct dpp_enveloped_data *data) {
struct asn1_hdr hdr;
struct asn1_oid oid;
if (asn1_get_sequence(pos, end - pos, &hdr, &pos) < 0)
return -1;
wpa_hexdump(MSG_MSGDUMP, "DPP: EncryptedConten... | dpp_parse_encrypted_content_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_enveloped_data(const u8 *env_data, size_t env_data_len,
dpp_enveloped_data *data) {
int val;
const u8 *pos;
const u8 *end;
asn1_hdr hdr;
unsigned long v9;
v9 = __readfsqword(0x28u);
memset(data, 0, sizeof(dpp_enveloped_data));
if (asn1_get_sequence(env_data, e... | static int dpp_parse_enveloped_data(const u8 *env_data, size_t env_data_len,
struct dpp_enveloped_data *data) {
struct asn1_hdr hdr;
const u8 *pos, *end;
int val;
os_memset(data, 0, sizeof(*data));
if (asn1_get_sequence(env_data, env_data_len, &hdr, &end) < 0)
return ... | dpp_parse_enveloped_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
crypto_ec_key *dpp_parse_jwk(json_token *jwk,
const dpp_curve_params **key_curve) {
const char *v2;
int v3;
int v4;
const char *name;
int prime_len;
int v7;
size_t v8;
const u8 *v9;
const u8 *v10;
wpabuf *x;
wpabuf *y;
crypto_ec_key *key;
json_token *token;
json_... | struct crypto_ec_key *dpp_parse_jwk(struct json_token *jwk,
const struct dpp_curve_params **key_curve) {
struct json_token *token;
const struct dpp_curve_params *curve;
struct wpabuf *x = NULL, *y = NULL;
struct crypto_ec_key *key = NULL;
token = json_get_member(jwk, "kty"... | dpp_parse_jwk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_parse_jws_prot_hdr(const dpp_curve_params *curve,
const u8 *prot_hdr, u16 prot_hdr_len,
int *hash_func) {
wpabuf *kid;
json_token *root;
json_token *token;
json_token *tokena;
kid = 0;
root = json_parse((const char *)prot_hdr, prot_h... | static struct wpabuf *
dpp_parse_jws_prot_hdr(const struct dpp_curve_params *curve, const u8 *prot_hdr,
u16 prot_hdr_len, int *hash_func) {
struct json_token *root, *token;
struct wpabuf *kid = NULL;
root = json_parse((const char *)prot_hdr, prot_hdr_len);
if (!root) {
wpa_printf(MSG... | dpp_parse_jws_prot_hdr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_asymmetric_key *dpp_parse_one_asymmetric_key(const u8 *buf, size_t len) {
crypto_ec_key *v3;
crypto_ec_key *v4;
int val;
const u8 *pos;
const u8 *end;
const u8 *next;
const u8 *params;
size_t params_len;
dpp_asymmetric_key *key;
asn1_hdr hdr;
asn1_oid oid;
char txt[88];
unsigned long v15;
... | static struct dpp_asymmetric_key *dpp_parse_one_asymmetric_key(const u8 *buf,
size_t len) {
struct asn1_hdr hdr;
const u8 *pos = buf, *end = buf + len, *next;
int val;
const u8 *params;
size_t params_len;
struct asn1_oid oid;
char txt[80];
s... | dpp_parse_one_asymmetric_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_recipient_infos(const u8 *pos, size_t len,
dpp_enveloped_data *data) {
const u8 *posa;
int val;
const u8 *end;
const u8 *next;
const u8 *e_end;
const u8 *params;
size_t params_len;
asn1_hdr hdr;
asn1_oid oid;
char buf[88];
unsigned long v15;
v15 = __r... | static int dpp_parse_recipient_infos(const u8 *pos, size_t len,
struct dpp_enveloped_data *data) {
struct asn1_hdr hdr;
const u8 *end = pos + len;
const u8 *next, *e_end;
struct asn1_oid oid;
int val;
const u8 *params;
size_t params_len;
wpa_hexdump(MSG_MSGDUMP, "DP... | dpp_parse_recipient_infos | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_parse_uri_version(dpp_bootstrap_info *bi, const char *version) {
if (!version)
return 0;
switch (*version) {
case '1':
bi->version = 1;
break;
case '2':
bi->version = 2;
break;
case '3':
bi->version = 3;
break;
default:
wpa_printf(2, "DPP: Unknown URI version");
b... | int dpp_parse_uri_version(struct dpp_bootstrap_info *bi, const char *version) {
#ifdef CONFIG_DPP2
if (!version || DPP_VERSION < 2)
return 0;
if (*version == '1')
bi->version = 1;
else if (*version == '2')
bi->version = 2;
else if (*version == '3')
bi->version = 3;
else
wpa_printf(MSG_DEB... | dpp_parse_uri_version | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_pbkdf2(size_t hash_len, const u8 *password, size_t password_len,
const u8 *salt, size_t salt_len, unsigned int iterations,
u8 *buf, size_t buflen) {
size_t v9;
unsigned int count;
size_t plen;
u8 digest[72];
unsigned long v19;
v19 = __readfsqword(0x28u);
count = 0;
... | int dpp_pbkdf2(size_t hash_len, const u8 *password, size_t password_len,
const u8 *salt, size_t salt_len, unsigned int iterations,
u8 *buf, size_t buflen) {
unsigned int count = 0;
unsigned char *pos = buf;
size_t left = buflen, plen;
unsigned char digest[DPP_MAX_HASH_LEN];
whil... | dpp_pbkdf2 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_pbkdf2_f(size_t hash_len, const u8 *password, size_t password_len,
const u8 *salt, size_t salt_len, unsigned int iterations,
unsigned int count, u8 *digest) {
unsigned int i;
size_t j;
const u8 *addr[2];
size_t len[3];
u8 count_buf[4];
unsigned char tmp[64];
u8 tm... | static int dpp_pbkdf2_f(size_t hash_len, const u8 *password,
size_t password_len, const u8 *salt, size_t salt_len,
unsigned int iterations, unsigned int count,
u8 *digest) {
unsigned char tmp[DPP_MAX_HASH_LEN], tmp2[DPP_MAX_HASH_LEN];
unsigned ... | dpp_pbkdf2_f | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_pfs_free(dpp_pfs *pfs) {
if (pfs) {
crypto_ecdh_deinit(pfs->ecdh);
wpabuf_free(pfs->ie);
wpabuf_clear_free(pfs->secret);
free(pfs);
}
} | void dpp_pfs_free(struct dpp_pfs *pfs) {
if (!pfs)
return;
crypto_ecdh_deinit(pfs->ecdh);
wpabuf_free(pfs->ie);
wpabuf_clear_free(pfs->secret);
os_free(pfs);
} | dpp_pfs_free | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_pfs *dpp_pfs_init(const u8 *net_access_key, size_t net_access_key_len) {
wpabuf *pubkey;
size_t v4;
char v5;
wpabuf *pub;
dpp_pfs *pfs;
crypto_ec_key *own_key;
pub = 0;
pfs = (dpp_pfs *)os_zalloc(0x20u);
if (!pfs)
return 0;
own_key = dpp_set_keypair(&pfs->curve, net_access_key, net_access_k... | struct dpp_pfs *dpp_pfs_init(const u8 *net_access_key,
size_t net_access_key_len) {
struct wpabuf *pub = NULL;
struct crypto_ec_key *own_key;
struct dpp_pfs *pfs;
pfs = os_zalloc(sizeof(*pfs));
if (!pfs)
return NULL;
own_key = dpp_set_keypair(&pfs->curve, net_access_key, n... | dpp_pfs_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_pfs_process(dpp_pfs *pfs, const u8 *peer_ie, size_t peer_ie_len) {
if (peer_ie_len <= 1)
return -1;
if (WPA_GET_LE16_7(peer_ie) == pfs->curve->ike_group) {
pfs->secret =
crypto_ecdh_set_peerkey(pfs->ecdh, 0, peer_ie + 2, peer_ie_len - 2);
pfs->secret = wpabuf_zeropad(pfs->secret, pfs->cu... | int dpp_pfs_process(struct dpp_pfs *pfs, const u8 *peer_ie,
size_t peer_ie_len) {
if (peer_ie_len < 2)
return -1;
if (WPA_GET_LE16(peer_ie) != pfs->curve->ike_group) {
wpa_printf(MSG_DEBUG, "DPP: Peer used different group for PFS");
return -1;
}
pfs->secret =
crypto_ecdh_s... | dpp_pfs_process | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_build_commit_reveal_req(dpp_pkex *pkex, const wpabuf *A_pub,
const u8 *u) {
u16 v3;
short v4;
size_t v5;
size_t v6;
const u8 *v7;
size_t v8;
u8 octet;
wpabuf *msg;
const dpp_curve_params *curve;
wpabuf *clear;
size_t clear_len;
size_t att... | static struct wpabuf *
dpp_pkex_build_commit_reveal_req(struct dpp_pkex *pkex,
const struct wpabuf *A_pub, const u8 *u) {
const struct dpp_curve_params *curve = pkex->own_bi->curve;
struct wpabuf *msg = NULL;
size_t clear_len, attr_len;
struct wpabuf *clear = NULL;
u8 *wrapped... | dpp_pkex_build_commit_reveal_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_build_commit_reveal_resp(dpp_pkex *pkex, const wpabuf *B_pub,
const u8 *v) {
u16 v3;
short v4;
size_t v5;
size_t v6;
const u8 *v7;
size_t v8;
u8 octet;
wpabuf *msg;
const dpp_curve_params *curve;
wpabuf *clear;
size_t clear_len;
size_t a... | static struct wpabuf *
dpp_pkex_build_commit_reveal_resp(struct dpp_pkex *pkex,
const struct wpabuf *B_pub, const u8 *v) {
const struct dpp_curve_params *curve = pkex->own_bi->curve;
struct wpabuf *msg = NULL;
const u8 *addr[2];
size_t len[2];
u8 octet;
u8 *wrapped;
struc... | dpp_pkex_build_commit_reveal_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_build_exchange_req(dpp_pkex *pkex, bool v2) {
const char *rax2;
u8 *own_mac;
size_t v4;
dpp_public_action_frame_type v5;
u16 v6;
crypto_ec *ec;
crypto_ec_point *M;
wpabuf *msg;
size_t attr_len;
crypto_ec_point *Qi;
const dpp_curve_params *curve;
const crypto_ec_point *X;
u8 *M... | static struct wpabuf *dpp_pkex_build_exchange_req(struct dpp_pkex *pkex,
bool v2) {
struct crypto_ec *ec = NULL;
const struct crypto_ec_point *X;
struct crypto_ec_point *Qi = NULL, *M = NULL;
u8 *Mx, *My;
struct wpabuf *msg = NULL;
size_t attr_len;
const s... | dpp_pkex_build_exchange_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_build_exchange_resp(dpp_pkex *pkex, dpp_status_error status,
const u8 *Nx, const u8 *Ny) {
u16 v4;
size_t attr_len;
wpabuf *msg;
const dpp_curve_params *curve;
curve = pkex->own_bi->curve;
attr_len = 5;
if ((*((_BYTE *)pkex + 8) & 8) != 0)
attr_le... | static struct wpabuf *dpp_pkex_build_exchange_resp(struct dpp_pkex *pkex,
enum dpp_status_error status,
const u8 *Nx, const u8 *Ny) {
struct wpabuf *msg = NULL;
size_t attr_len;
const struct dpp_curve_params *cur... | dpp_pkex_build_exchange_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_bootstrap_info *dpp_pkex_finish(dpp_global *dpp, dpp_pkex *pkex,
const u8 *peer, unsigned int freq) {
dpp_bootstrap_info *bi;
bi = (dpp_bootstrap_info *)os_zalloc(0x128u);
if (!bi)
return 0;
bi->id = dpp_next_id(dpp);
bi->type = dpp_bootstrap_type_DPP_BOOTSTRAP_PKE... | struct dpp_bootstrap_info *dpp_pkex_finish(struct dpp_global *dpp,
struct dpp_pkex *pkex,
const u8 *peer, unsigned int freq) {
struct dpp_bootstrap_info *bi;
bi = os_zalloc(sizeof(*bi));
if (!bi)
return NULL;
bi->id = dpp... | dpp_pkex_finish | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_rx_commit_reveal_req(dpp_pkex *pkex, const u8 *hdr,
const u8 *buf, size_t buflen) {
const u8 *v4;
size_t v5;
const u8 *v6;
size_t v7;
const u8 *v8;
size_t v9;
const u8 *v10;
size_t v11;
const u8 *v12;
size_t v13;
const u8 *v14;
size_t v15;
... | struct wpabuf *dpp_pkex_rx_commit_reveal_req(struct dpp_pkex *pkex,
const u8 *hdr, const u8 *buf,
size_t buflen) {
const struct dpp_curve_params *curve = pkex->own_bi->curve;
size_t Jx_len, Lx_len;
u8 Jx[DPP_MAX_SHARED_SECRE... | dpp_pkex_rx_commit_reveal_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_pkex_rx_commit_reveal_resp(dpp_pkex *pkex, const u8 *hdr, const u8 *buf,
size_t buflen) {
const u8 *v4;
size_t v5;
const u8 *v6;
size_t v7;
const u8 *v8;
size_t v9;
u8 octet;
u16 wrapped_data_len;
u16 b_key_len;
u16 peer_v_len;
int ret;
size_t Lx_len;
... | int dpp_pkex_rx_commit_reveal_resp(struct dpp_pkex *pkex, const u8 *hdr,
const u8 *buf, size_t buflen) {
const struct dpp_curve_params *curve = pkex->own_bi->curve;
const u8 *wrapped_data, *b_key, *peer_v;
u16 wrapped_data_len, b_key_len, peer_v_len = 0;
const u8 *addr[4];
s... | dpp_pkex_rx_commit_reveal_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_pkex *dpp_pkex_rx_exchange_req(void *msg_ctx, dpp_bootstrap_info *bi,
const u8 *own_mac, const u8 *peer_mac,
const char *identifier, const char *code,
const u8 *buf, size_t len, bool v2) {
wpabuf *v10;
const... | struct dpp_pkex *dpp_pkex_rx_exchange_req(void *msg_ctx,
struct dpp_bootstrap_info *bi,
const u8 *own_mac, const u8 *peer_mac,
const char *identifier,
c... | dpp_pkex_rx_exchange_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_pkex_rx_exchange_resp(dpp_pkex *pkex, const u8 *peer_mac,
const u8 *buf, size_t buflen) {
u16 v5;
u8 *v6;
const u8 *v7;
size_t v8;
const u8 *v9;
size_t v10;
const u8 *v11;
size_t v12;
char *code;
const u8 *v14;
const u8 *v15;
u16 attr_status_len;
u... | struct wpabuf *dpp_pkex_rx_exchange_resp(struct dpp_pkex *pkex,
const u8 *peer_mac, const u8 *buf,
size_t buflen) {
const u8 *attr_status, *attr_id, *attr_key, *attr_group;
u16 attr_status_len, attr_id_len, attr_key_len, attr_group_le... | dpp_pkex_rx_exchange_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_prepare_channel_list(dpp_authentication *auth, unsigned int neg_freq,
hostapd_hw_modes *own_modes, u16 num_modes) {
int res;
int resa;
unsigned int i;
char *pos;
char freqs[190];
_BYTE v10[18];
*(_QWORD *)&v10[10] = __readfsqword(0x28u);
if (own_modes) {
if (aut... | int dpp_prepare_channel_list(struct dpp_authentication *auth,
unsigned int neg_freq,
struct hostapd_hw_modes *own_modes,
u16 num_modes) {
int res;
char freqs[DPP_BOOTSTRAP_MAX_FREQ * 6 + 10], *pos, *end;
unsigned int i;
if (... | dpp_prepare_channel_list | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_status_error dpp_process_signed_connector(dpp_signed_connector_info *info,
crypto_ec_key *csign_pub,
const char *connector) {
u16 v3;
int v4;
size_t v5;
int hash_func;
dpp_status_error ret;
int res;
const char ... | enum dpp_status_error
dpp_process_signed_connector(struct dpp_signed_connector_info *info,
struct crypto_ec_key *csign_pub,
const char *connector) {
enum dpp_status_error ret = 255;
const char *pos, *end, *signed_start, *signed_end;
struct wpabuf *kid = NU... | dpp_process_signed_connector | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_reconfig_auth_conf_rx(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
signed long attr_lena;
u8 flags;
u16 trans_id_len;
u16 version_len;
u16 wrapped_data_len;
u16 c_nonce_len;
u16 e_nonce_len;
u16 reconfig_flags_len;
u16 status_l... | int dpp_reconfig_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
const u8 *trans_id, *version, *wrapped_data, *c_nonce, *e_nonce,
*reconfig_flags, *status;
u16 trans_id_len, version_len, wrapped_data_len, c_nonce_len, e_nonce_... | dpp_reconfig_auth_conf_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_authentication *
dpp_reconfig_auth_req_rx(dpp_global *dpp, void *msg_ctx,
const char *own_connector, const u8 *net_access_key,
size_t net_access_key_len, const u8 *csign_key,
size_t csign_key_len, unsigned int freq, const u8 *hdr,
... | struct dpp_authentication *
dpp_reconfig_auth_req_rx(struct dpp_global *dpp, void *msg_ctx,
const char *own_connector, const u8 *net_access_key,
size_t net_access_key_len, const u8 *csign_key,
size_t csign_key_len, unsigned int freq, const u8 *h... | dpp_reconfig_auth_req_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_reconfig_auth_resp_rx(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
signed long attr_lenb;
u16 trans_id_len;
u16 version_len;
u16 r_connector_len;
u16 r_proto_len;
u16 wrapped_data_len;
u16 c_nonce_len;
u16 e_nonce_len;
... | struct wpabuf *dpp_reconfig_auth_resp_rx(struct dpp_authentication *auth,
const u8 *hdr, const u8 *attr_start,
size_t attr_len) {
const u8 *trans_id, *version, *r_connector, *r_proto, *wrapped_data, *c_nonce,
*e_nonce, *conn_statu... | dpp_reconfig_auth_resp_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_reconfig_build_conf(dpp_authentication *auth) {
u16 v1;
size_t v2;
size_t v3;
const u8 *v4;
wpabuf *msg;
wpabuf *clear;
size_t attr_len;
u8 *attr_start;
u8 *attr_end;
u8 *wrapped;
size_t len[2];
const u8 *addr[2];
unsigned long v14;
v14 = __readfsqword(0x28u);
msg = 0;
clear... | struct wpabuf *dpp_reconfig_build_conf(struct dpp_authentication *auth) {
struct wpabuf *msg = NULL, *clear;
u8 *attr_start, *attr_end;
size_t clear_len, attr_len, len[2];
const u8 *addr[2];
u8 *wrapped;
u8 flags;
clear_len = 4 + 1 + 4 + 1 + 2 * (4 + auth->curve->nonce_len) + 4 + 1;
clear = wpabuf_allo... | dpp_reconfig_build_conf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_reconfig_build_req(dpp_authentication *auth) {
u16 v2;
size_t attr_len;
wpabuf *msg;
attr_len = strlen(auth->conf->connector) + auth->curve->nonce_len + 18;
msg = dpp_alloc_msg(dpp_public_action_frame_type_DPP_PA_RECONFIG_AUTH_REQ,
attr_len);
if (!msg)
return 0;
wpab... | static struct wpabuf *dpp_reconfig_build_req(struct dpp_authentication *auth) {
struct wpabuf *msg;
size_t attr_len;
attr_len = 4 + 1 + 4 + 1 + 4 + os_strlen(auth->conf->connector) + 4 +
auth->curve->nonce_len;
msg = dpp_alloc_msg(DPP_PA_RECONFIG_AUTH_REQ, attr_len);
if (!msg)
return NULL;
... | dpp_reconfig_build_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_reconfig_build_resp(dpp_authentication *auth, const char *own_connector,
wpabuf *conn_status) {
size_t nonce_len;
u16 v4;
size_t v5;
size_t v6;
u16 v7;
u16 v8;
u16 v9;
size_t v10;
size_t v11;
const u8 *v12;
int res;
wpabuf *msg;
wpabuf *pr;
size_t clear_le... | static int dpp_reconfig_build_resp(struct dpp_authentication *auth,
const char *own_connector,
struct wpabuf *conn_status) {
struct wpabuf *msg = NULL, *clear, *pr = NULL;
u8 *attr_start, *attr_end;
size_t clear_len, attr_len, len[2];
const u... | dpp_reconfig_build_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_authentication *dpp_reconfig_init(dpp_global *dpp, void *msg_ctx,
dpp_configurator *conf, unsigned int freq,
u16 group, const u8 *a_nonce_attr,
size_t a_nonce_len, const u8 *e_id_attr,
... | struct dpp_authentication *
dpp_reconfig_init(struct dpp_global *dpp, void *msg_ctx,
struct dpp_configurator *conf, unsigned int freq, u16 group,
const u8 *a_nonce_attr, size_t a_nonce_len,
const u8 *e_id_attr, size_t e_id_len) {
struct dpp_authentication *auth;
... | dpp_reconfig_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_relay_add_controller(dpp_global *dpp, dpp_relay_config *config) {
dpp_relay_controller *ctrl;
if (!dpp)
return -1;
ctrl = (dpp_relay_controller *)os_zalloc(0x80u);
if (!ctrl)
return -1;
dl_list_init_4(&ctrl->conn);
ctrl->global = dpp;
memcpy(&ctrl->ipaddr, config->ipaddr, sizeof(ctrl->ipa... | int dpp_relay_add_controller(struct dpp_global *dpp,
struct dpp_relay_config *config) {
struct dpp_relay_controller *ctrl;
if (!dpp)
return -1;
ctrl = os_zalloc(sizeof(*ctrl));
if (!ctrl)
return -1;
dl_list_init(&ctrl->conn);
ctrl->global = dpp;
os_memcpy(&ctrl->ipad... | dpp_relay_add_controller | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_relay_conn_timeout(void *eloop_ctx, void *timeout_ctx) {
wpa_printf(2,
"DPP: Timeout while waiting for relayed connection to complete");
dpp_connection_remove((dpp_connection *)eloop_ctx);
} | static void dpp_relay_conn_timeout(void *eloop_ctx, void *timeout_ctx) {
struct dpp_connection *conn = eloop_ctx;
wpa_printf(MSG_DEBUG,
"DPP: Timeout while waiting for relayed connection to complete");
dpp_connection_remove(conn);
} | dpp_relay_conn_timeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_relay_controller_free(dpp_relay_controller *ctrl) {
dpp_connection *conn;
dpp_connection *tmp;
conn = (dpp_connection *)ctrl->conn.next;
tmp = (dpp_connection *)conn->list.next;
while (conn != (dpp_connection *)&ctrl->conn) {
dpp_connection_remove(conn);
conn = tmp;
tmp = (dpp_connection... | static void dpp_relay_controller_free(struct dpp_relay_controller *ctrl) {
struct dpp_connection *conn, *tmp;
dl_list_for_each_safe(conn, tmp, &ctrl->conn, struct dpp_connection, list)
dpp_connection_remove(conn);
os_free(ctrl);
} | dpp_relay_controller_free | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_relay_controller *dpp_relay_controller_get(dpp_global *dpp,
const u8 *pkhash) {
dpp_relay_controller *ctrl;
if (!dpp)
return 0;
for (ctrl = (dpp_relay_controller *)dpp->controllers.next;
ctrl != (dpp_relay_controller *)&dpp->controllers;
ctrl =... | static struct dpp_relay_controller *
dpp_relay_controller_get(struct dpp_global *dpp, const u8 *pkhash) {
struct dpp_relay_controller *ctrl;
if (!dpp)
return NULL;
dl_list_for_each(ctrl, &dpp->controllers, struct dpp_relay_controller, list) {
if (os_memcmp(pkhash, ctrl->pkhash, SHA256_MAC_LEN) == 0)
... | dpp_relay_controller_get | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_relay_controller *dpp_relay_controller_get_ctx(dpp_global *dpp,
void *cb_ctx) {
dpp_relay_controller *ctrl;
if (!dpp)
return 0;
for (ctrl = (dpp_relay_controller *)dpp->controllers.next;
ctrl != (dpp_relay_controller *)&dpp->controllers;
ct... | static struct dpp_relay_controller *
dpp_relay_controller_get_ctx(struct dpp_global *dpp, void *cb_ctx) {
struct dpp_relay_controller *ctrl;
if (!dpp)
return NULL;
dl_list_for_each(ctrl, &dpp->controllers, struct dpp_relay_controller, list) {
if (cb_ctx == ctrl->cb_ctx)
return ctrl;
}
return ... | dpp_relay_controller_get_ctx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_relay_flush_controllers(dpp_global *dpp) {
dpp_relay_controller *ctrl;
dpp_relay_controller *tmp;
if (dpp) {
ctrl = (dpp_relay_controller *)dpp->controllers.next;
tmp = (dpp_relay_controller *)ctrl->list.next;
while (ctrl != (dpp_relay_controller *)&dpp->controllers) {
dl_list_del_4(&c... | void dpp_relay_flush_controllers(struct dpp_global *dpp) {
struct dpp_relay_controller *ctrl, *tmp;
if (!dpp)
return;
dl_list_for_each_safe(ctrl, tmp, &dpp->controllers,
struct dpp_relay_controller, list) {
dl_list_del(&ctrl->list);
dpp_relay_controller_free(ctrl);
}
} | dpp_relay_flush_controllers | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_connection *dpp_relay_new_conn(dpp_relay_controller *ctrl, const u8 *src,
unsigned int freq) {
const char *v4;
int *v5;
char *v6;
int *v7;
char *v8;
socklen_t addrlen;
dpp_connection *conn;
sockaddr_storage addr;
char txt[104];
unsigned long v14;
v14 = __rea... | static struct dpp_connection *
dpp_relay_new_conn(struct dpp_relay_controller *ctrl, const u8 *src,
unsigned int freq) {
struct dpp_connection *conn;
struct sockaddr_storage addr;
socklen_t addrlen;
char txt[100];
if (dl_list_len(&ctrl->conn) >= 15) {
wpa_printf(MSG_DEBUG, "DPP: Too ma... | dpp_relay_new_conn | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_relay_rx_action(dpp_global *dpp, const u8 *src, const u8 *hdr,
const u8 *buf, size_t len, unsigned int freq,
const u8 *i_bootstrap, const u8 *r_bootstrap,
void *cb_ctx) {
u8 type;
dpp_global *ctrl;
dpp_relay_controller *ctrla;
dpp_c... | int dpp_relay_rx_action(struct dpp_global *dpp, const u8 *src, const u8 *hdr,
const u8 *buf, size_t len, unsigned int freq,
const u8 *i_bootstrap, const u8 *r_bootstrap,
void *cb_ctx) {
struct dpp_relay_controller *ctrl;
struct dpp_connection *... | dpp_relay_rx_action | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_relay_rx_gas_req(dpp_global *dpp, const u8 *src, const u8 *data,
size_t data_len) {
dpp_global *ctrl;
dpp_connection *conn;
dpp_connection *found;
wpabuf *msg;
found = 0;
for (ctrl = (dpp_global *)dpp->controllers.next;
ctrl != (dpp_global *)&dpp->controllers && !fou... | int dpp_relay_rx_gas_req(struct dpp_global *dpp, const u8 *src, const u8 *data,
size_t data_len) {
struct dpp_relay_controller *ctrl;
struct dpp_connection *conn, *found = NULL;
struct wpabuf *msg;
dl_list_for_each(ctrl, &dpp->controllers, struct dpp_relay_controller, list) {
if (f... | dpp_relay_rx_gas_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_relay_tx(dpp_connection *conn, const u8 *hdr, const u8 *buf,
size_t len) {
u8 type;
type = hdr[5];
wpa_printf(2, "DPP: Continue already established Relay/Controller connection "
"for this session");
wpabuf_free(conn->msg_out);
conn->msg_out_pos = 0;
conn->msg_out = ... | static int dpp_relay_tx(struct dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
u8 type = hdr[DPP_HDR_LEN - 1];
wpa_printf(MSG_DEBUG, "DPP: Continue already established Relay/Controller "
"connection for this session");
wpabuf_free(conn->msg_out);
... | dpp_relay_tx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_rx_gas_resp(dpp_connection *conn, const u8 *msg, size_t len,
bool comeback) {
size_t v4;
unsigned char *v6;
u8 dialog_token;
u16 status;
u16 comeback_delay;
u16 slen;
u16 slena;
const u8 *pos;
const u8 *posa;
const u8 *posb;
const u8 *end;
const u8 *adv_proto;
const... | static int dpp_rx_gas_resp(struct dpp_connection *conn, const u8 *msg,
size_t len, bool comeback) {
struct wpabuf *buf;
u8 dialog_token;
const u8 *pos, *end, *next, *adv_proto;
u16 status, slen, comeback_delay;
if (len < (size_t)(5 + 2 + (comeback ? 1 : 0)))
return -1;
wpa_p... | dpp_rx_gas_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char *dpp_sign_connector(dpp_configurator *conf, const wpabuf *dppcon) {
size_t v2;
const void *v3;
char *v4;
char *v5;
size_t signed1_len;
size_t signed2_len;
size_t signed3_len;
char *signed3;
char *signed_conn;
char *signed1;
char *signed2;
char *pos;
unsigned long v15;
v15 = __readfsqwo... | char *dpp_sign_connector(struct dpp_configurator *conf,
const struct wpabuf *dppcon) {
char *signed1 = NULL, *signed2 = NULL, *signed3 = NULL;
char *signed_conn = NULL, *pos;
size_t signed1_len, signed2_len, signed3_len;
signed1 = dpp_build_jws_prot_hdr(conf, &signed1_len);
signed2 =... | dpp_sign_connector | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_start_listen_cb(wpa_radio_work *work, int deinit) {
wpa_supplicant *wpa_s;
wpas_dpp_listen_work *lwork;
wpa_s = work->wpa_s;
lwork = (wpas_dpp_listen_work *)work->ctx;
if (deinit) {
if ((*((_BYTE *)work + 56) & 1) != 0) {
wpa_s->dpp_listen_work = 0;
wpas_dpp_listen_stop(wpa_s);
}... | static void dpp_start_listen_cb(struct wpa_radio_work *work, int deinit) {
struct wpa_supplicant *wpa_s = work->wpa_s;
struct wpas_dpp_listen_work *lwork = work->ctx;
if (deinit) {
if (work->started) {
wpa_s->dpp_listen_work = NULL;
wpas_dpp_listen_stop(wpa_s);
}
wpas_dpp_listen_work_free... | dpp_start_listen_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_tcp_build_csr(void *eloop_ctx, void *timeout_ctx) {
const char *v2;
dpp_authentication *auth;
auth = (dpp_authentication *)*((_QWORD *)eloop_ctx + 5);
if (auth && auth->csrattrs) {
wpa_printf(2, "DPP: Build CSR");
wpabuf_free(auth->csr);
if (*((_QWORD *)eloop_ctx + 17))
v2 = (const c... | static void dpp_tcp_build_csr(void *eloop_ctx, void *timeout_ctx) {
struct dpp_connection *conn = eloop_ctx;
struct dpp_authentication *auth = conn->auth;
if (!auth || !auth->csrattrs)
return;
wpa_printf(MSG_DEBUG, "DPP: Build CSR");
wpabuf_free(auth->csr);
auth->csr = dpp_build_csr(auth, conn->name ... | dpp_tcp_build_csr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_tcp_encaps(const u8 *hdr, const u8 *buf, size_t len) {
wpabuf *msg;
msg = wpabuf_alloc(len + 11);
if (!msg)
return 0;
wpabuf_put_be32_0(msg, len + 7);
wpabuf_put_u8_12(msg, 9u);
wpabuf_put_data_12(msg, hdr, 6u);
wpabuf_put_data_12(msg, buf, len);
wpa_hexdump_buf_9(1, "DPP: Outgoing TCP ... | static struct wpabuf *dpp_tcp_encaps(const u8 *hdr, const u8 *buf, size_t len) {
struct wpabuf *msg;
msg = wpabuf_alloc(4 + 1 + DPP_HDR_LEN + len);
if (!msg)
return NULL;
wpabuf_put_be32(msg, 1 + DPP_HDR_LEN + len);
wpabuf_put_u8(msg, WLAN_PA_VENDOR_SPECIFIC);
wpabuf_put_data(msg, hdr, DPP_HDR_LEN);
... | dpp_tcp_encaps | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_tcp_gas_query_comeback(void *eloop_ctx, void *timeout_ctx) {
wpabuf *msg;
if (*((_QWORD *)eloop_ctx + 5)) {
wpa_printf(2, "DPP: Send GAS Comeback Request");
msg = wpabuf_alloc(6u);
if (msg) {
wpabuf_put_be32_0(msg, 2u);
wpabuf_put_u8_12(msg, 0xCu);
wpabuf_put_u8_12(msg, *((_B... | static void dpp_tcp_gas_query_comeback(void *eloop_ctx, void *timeout_ctx) {
struct dpp_connection *conn = eloop_ctx;
struct dpp_authentication *auth = conn->auth;
struct wpabuf *msg;
if (!auth)
return;
wpa_printf(MSG_DEBUG, "DPP: Send GAS Comeback Request");
msg = wpabuf_alloc(4 + 2);
if (!msg)
... | dpp_tcp_gas_query_comeback | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_authentication *dpp_tcp_get_auth(dpp_global *dpp, unsigned int id) {
dpp_connection *conn;
for (conn = (dpp_connection *)dpp->tcp_init.next;
conn != (dpp_connection *)&dpp->tcp_init;
conn = (dpp_connection *)conn->list.next) {
if (dpp_tcp_peer_id_match(conn->auth, id))
return conn->auth... | static struct dpp_authentication *dpp_tcp_get_auth(struct dpp_global *dpp,
unsigned int id) {
struct dpp_connection *conn;
dl_list_for_each(conn, &dpp->tcp_init, struct dpp_connection, list) {
if (dpp_tcp_peer_id_match(conn->auth, id))
return conn->auth;... | dpp_tcp_get_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_init(dpp_global *dpp, dpp_authentication *auth,
const hostapd_ip_addr *addr, int port, const char *name,
dpp_netrole netrole, void *msg_ctx, void *cb_ctx,
int (*process_conf_obj)(void *, dpp_authentication *)) {
const char *v9;
const char *v11;
char *... | int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth,
const struct hostapd_ip_addr *addr, int port, const char *name,
enum dpp_netrole netrole, void *msg_ctx, void *cb_ctx,
int (*process_conf_obj)(void *ctx,
... | dpp_tcp_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_tcp_init_flush(dpp_global *dpp) {
dpp_connection *conn;
dpp_connection *tmp;
conn = (dpp_connection *)dpp->tcp_init.next;
tmp = (dpp_connection *)conn->list.next;
while (conn != (dpp_connection *)&dpp->tcp_init) {
dpp_connection_remove(conn);
conn = tmp;
tmp = (dpp_connection *)tmp->list... | void dpp_tcp_init_flush(struct dpp_global *dpp) {
struct dpp_connection *conn, *tmp;
dl_list_for_each_safe(conn, tmp, &dpp->tcp_init, struct dpp_connection, list)
dpp_connection_remove(conn);
} | dpp_tcp_init_flush | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool dpp_tcp_peer_id_match(dpp_authentication *auth, unsigned int id) {
return auth && (auth->peer_bi && id == auth->peer_bi->id ||
auth->tmp_peer_bi && id == auth->tmp_peer_bi->id);
} | static bool dpp_tcp_peer_id_match(struct dpp_authentication *auth,
unsigned int id) {
return auth && ((auth->peer_bi && auth->peer_bi->id == id) ||
(auth->tmp_peer_bi && auth->tmp_peer_bi->id == id));
} | dpp_tcp_peer_id_match | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_rx_gas_resp(dpp_connection *conn, wpabuf *resp) {
dpp_status_error v3;
int res;
int resa;
int resb;
dpp_authentication *auth;
wpabuf *msg;
auth = conn->auth;
wpa_printf(2, "DPP: Configuration Response for local stack from TCP");
if (auth)
res = dpp_conf_resp_rx(auth, resp);
else
... | static int dpp_tcp_rx_gas_resp(struct dpp_connection *conn,
struct wpabuf *resp) {
struct dpp_authentication *auth = conn->auth;
int res;
struct wpabuf *msg;
enum dpp_status_error status;
wpa_printf(MSG_DEBUG, "DPP: Configuration Response for local stack from TCP");
if (auth... | dpp_tcp_rx_gas_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_send(dpp_connection *conn) {
size_t v2;
const u8 *v3;
int *v4;
char *v5;
int v6;
int res;
if (conn->msg_out) {
v2 = wpabuf_len_16(conn->msg_out) - conn->msg_out_pos;
v3 = wpabuf_head_u8_7(conn->msg_out);
res = send(conn->sock, &v3[conn->msg_out_pos], v2, 0);
if (res >= 0) {
... | static int dpp_tcp_send(struct dpp_connection *conn) {
int res;
if (!conn->msg_out) {
eloop_unregister_sock(conn->sock, EVENT_TYPE_WRITE);
conn->write_eloop = 0;
return -1;
}
res = send(conn->sock, wpabuf_head_u8(conn->msg_out) + conn->msg_out_pos,
wpabuf_len(conn->msg_out) - conn->msg... | dpp_tcp_send | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_send_comeback_delay(dpp_connection *conn, u8 action) {
size_t len;
wpabuf *buf;
len = 18;
if (action == 13)
len = 19;
buf = wpabuf_alloc(len + 4);
if (!buf)
return -1;
wpabuf_put_be32_0(buf, len);
wpabuf_put_u8_12(buf, action);
wpabuf_put_u8_12(buf, conn->gas_dialog_token);
wpab... | static int dpp_tcp_send_comeback_delay(struct dpp_connection *conn, u8 action) {
struct wpabuf *buf;
size_t len = 18;
if (action == WLAN_PA_GAS_COMEBACK_RESP)
len++;
buf = wpabuf_alloc(4 + len);
if (!buf)
return -1;
wpabuf_put_be32(buf, len);
wpabuf_put_u8(buf, action);
wpabuf_put_u8(buf, co... | dpp_tcp_send_comeback_delay | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_send_gas_resp(dpp_connection *conn, u8 action, wpabuf *resp) {
size_t len;
wpabuf *buf;
if (!resp)
return -1;
len = wpabuf_len_16(resp) + 18;
if (action == 13)
++len;
buf = wpabuf_alloc(len + 4);
if (buf) {
wpabuf_put_be32_0(buf, len);
wpabuf_put_u8_12(buf, action);
wpabuf... | static int dpp_tcp_send_gas_resp(struct dpp_connection *conn, u8 action,
struct wpabuf *resp) {
struct wpabuf *buf;
size_t len;
if (!resp)
return -1;
len = 18 + wpabuf_len(resp);
if (action == WLAN_PA_GAS_COMEBACK_RESP)
len++;
buf = wpabuf_alloc(4 + len);
if (!b... | dpp_tcp_send_gas_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_tcp_send_msg(dpp_connection *conn, const wpabuf *msg) {
size_t v2;
int v4;
size_t v5;
const u8 *v6;
wpabuf_free(conn->msg_out);
conn->msg_out_pos = 0;
v2 = wpabuf_len_16(msg);
conn->msg_out = wpabuf_alloc(v2 + 3);
if (!conn->msg_out)
return -1;
v4 = wpabuf_len_16(msg);
wpabuf_put_be32... | static int dpp_tcp_send_msg(struct dpp_connection *conn,
const struct wpabuf *msg) {
wpabuf_free(conn->msg_out);
conn->msg_out_pos = 0;
conn->msg_out = wpabuf_alloc(4 + wpabuf_len(msg) - 1);
if (!conn->msg_out)
return -1;
wpabuf_put_be32(conn->msg_out, wpabuf_len(msg) - 1);
w... | dpp_tcp_send_msg | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_update_reconfig_id(dpp_reconfig_id *id) {
int ret;
const crypto_ec_point *pp;
const crypto_ec_point *e_prime_id;
const crypto_ec_point *a_nonce;
crypto_bignum *bn;
const crypto_bignum *q;
const crypto_ec_point *generator;
ret = -1;
pp = crypto_ec_key_get_public_key(id->pp_key);
e_prime_id =... | int dpp_update_reconfig_id(struct dpp_reconfig_id *id) {
const struct crypto_bignum *q;
struct crypto_bignum *bn;
const struct crypto_ec_point *pp, *generator;
struct crypto_ec_point *e_prime_id, *a_nonce;
int ret = -1;
pp = crypto_ec_key_get_public_key(id->pp_key);
e_prime_id = crypto_ec_point_init(id->... | dpp_update_reconfig_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_validate_csr(dpp_authentication *auth, const wpabuf *csrbuf) {
int attr_type;
int ret;
unsigned int hash_len;
size_t attr_len;
size_t cp_len;
unsigned char *cp;
crypto_csr *csr;
const u8 *attr;
u8 exp_cp[72];
unsigned long v12;
v12 = __readfsqword(0x28u);
cp = 0;
hash_len = auth->curv... | int dpp_validate_csr(struct dpp_authentication *auth,
const struct wpabuf *csrbuf) {
struct crypto_csr *csr;
const u8 *attr;
size_t attr_len;
int attr_type;
unsigned char *cp = NULL;
size_t cp_len;
u8 exp_cp[DPP_CP_LEN];
unsigned int hash_len = auth->curve->hash_len;
int ret = -1;... | dpp_validate_csr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_write_adv_proto(wpabuf *buf) {
wpabuf_put_u8_7(buf, 0x6Cu);
wpabuf_put_u8_7(buf, 8u);
wpabuf_put_u8_7(buf, 0x7Fu);
wpabuf_put_u8_7(buf, 0xDDu);
wpabuf_put_u8_7(buf, 5u);
wpabuf_put_be24_0(buf, 0x506F9Au);
wpabuf_put_u8_7(buf, 0x1Au);
wpabuf_put_u8_7(buf, 1u);
} | void dpp_write_adv_proto(struct wpabuf *buf) {
wpabuf_put_u8(buf, WLAN_EID_ADV_PROTO);
wpabuf_put_u8(buf, 8);
wpabuf_put_u8(buf, 0x7f);
wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC);
wpabuf_put_u8(buf, 5);
wpabuf_put_be24(buf, OUI_WFA);
wpabuf_put_u8(buf, DPP_OUI_TYPE);
wpabuf_put_u8(buf, 0x01);
} | dpp_write_adv_proto | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_write_gas_query(wpabuf *buf, wpabuf *query) {
u16 v2;
v2 = wpabuf_len_10(query);
wpabuf_put_le16_2(buf, v2);
wpabuf_put_buf_1(buf, query);
} | void dpp_write_gas_query(struct wpabuf *buf, struct wpabuf *query) {
wpabuf_put_le16(buf, wpabuf_len(query));
wpabuf_put_buf(buf, query);
} | dpp_write_gas_query | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *driver_flag_to_string(u64 flag) {
const char *result;
if (flag == 0x8000000000000000LL)
return "EXTENDED_KEY_ID";
if (flag > 0x8000000000000000LL)
return "UNKNOWN";
if (flag == 0x4000000000000000LL)
return "BEACON_PROTECTION";
if (flag > 0x4000000000000000LL)
return "UNKNOWN";
i... | const char *driver_flag_to_string(u64 flag) {
#define DF2S(x) \
case WPA_DRIVER_FLAGS_##x: \
return #x
switch (flag) {
DF2S(DRIVER_IE);
DF2S(SET_KEYS_AFTER_ASSOC);
DF2S(DFS_OFFLOAD);
... | driver_flag_to_string | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int drv_supports_vht(wpa_supplicant *wpa_s, const wpa_ssid *ssid) {
u8 channel;
int i;
hostapd_hw_mode hw_mode;
hostapd_hw_modes *mode;
unsigned long v7;
v7 = __readfsqword(0x28u);
mode = 0;
hw_mode = ieee80211_freq_to_chan(ssid->frequency, &channel);
if (hw_mode == hostapd_hw_mode_NUM_HOSTAPD_MODES)... | static int drv_supports_vht(struct wpa_supplicant *wpa_s,
const struct wpa_ssid *ssid) {
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
u8 channel;
int i;
hw_mode = ieee80211_freq_to_chan(ssid->frequency, &channel);
if (hw_mode == NUM_HOSTAPD_MODES)
retu... | drv_supports_vht | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool dscp_valid_domain_name(const char *str) {
char *stra;
stra = (char *)str;
if (!*str)
return 0;
while (*stra) {
if (is_ctrl_char(*stra) || *stra == 32 || *stra == 61)
return 0;
++stra;
}
return 1;
} | static bool dscp_valid_domain_name(const char *str) {
if (!str[0])
return false;
while (*str) {
if (is_ctrl_char(*str) || *str == ' ' || *str == '=')
return false;
str++;
}
return true;
} | dscp_valid_domain_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dump_freq_data(wpa_supplicant *wpa_s, const char *title,
wpa_used_freq_data *freqs_data, unsigned int len) {
unsigned int i;
wpa_msg(wpa_s, 2, "Shared frequencies (len=%u): %s", len, title);
for (i = 0; i < len; ++i)
wpa_msg(wpa_s, 2, "freq[%u]: %d, flags=0x%X", i, freqs_data[i].freq... | void dump_freq_data(struct wpa_supplicant *wpa_s, const char *title,
struct wpa_used_freq_data *freqs_data, unsigned int len) {
unsigned int i;
wpa_dbg(wpa_s, MSG_DEBUG, "Shared frequencies (len=%u): %s", len, title);
for (i = 0; i < len; i++) {
struct wpa_used_freq_data *cur = &freqs_dat... | dump_freq_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dump_ifidx(wpa_driver_nl80211_data *drv) {
int i;
int res;
char *pos;
char buf[200];
unsigned long v5;
v5 = __readfsqword(0x28u);
pos = buf;
for (i = 0; i < drv->num_if_indices; ++i) {
if (drv->if_indices[i].ifindex) {
res = snprintf(pos, (char *)&v5 - pos, " %d(%d)",
... | static void dump_ifidx(struct wpa_driver_nl80211_data *drv) {
char buf[200], *pos, *end;
int i, res;
pos = buf;
end = pos + sizeof(buf);
for (i = 0; i < drv->num_if_indices; i++) {
if (!drv->if_indices[i].ifindex)
continue;
res = os_snprintf(pos, end - pos, " %d(%d)", drv->if_indices[i].ifinde... | dump_ifidx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dump_scan_res(wpa_scan_results *scan_res) {
const char *v1;
const char *v2;
size_t i;
wpa_scan_res *r;
u8 *pos;
u8 *posa;
if (scan_res->res && scan_res->num) {
wpa_printf(0, "Sorted scan results");
for (i = 0; i < scan_res->num; ++i) {
r = scan_res->res[i];
if ((r->flags & 8) != ... | static void dump_scan_res(struct wpa_scan_results *scan_res) {
#ifndef CONFIG_NO_STDOUT_DEBUG
size_t i;
if (scan_res->res == NULL || scan_res->num == 0)
return;
wpa_printf(MSG_EXCESSIVE, "Sorted scan results");
for (i = 0; i < scan_res->num; i++) {
struct wpa_scan_res *r = scan_res->res[i];
u8 *p... | dump_scan_res | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_allowed_method(eap_sm *sm, int vendor, u32 method) {
eap_peer_config *config;
config = eap_get_config(sm);
return eap_config_allowed_method(sm, config, vendor, method);
} | int eap_allowed_method(struct eap_sm *sm, int vendor, u32 method) {
return eap_config_allowed_method(sm, eap_get_config(sm), vendor, method);
} | eap_allowed_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_allowed_phase2_type(int vendor, int type) {
if (vendor == 39068)
return 1;
if (vendor)
return 0;
return type != 25 && type != 21 && type != 43 && type != 55;
} | static int eap_allowed_phase2_type(int vendor, int type) {
if (vendor == EAP_VENDOR_HOSTAP)
return 1;
if (vendor != EAP_VENDOR_IETF)
return 0;
return type != EAP_TYPE_PEAP && type != EAP_TYPE_TTLS &&
type != EAP_TYPE_FAST && type != EAP_TYPE_TEAP;
} | eap_allowed_phase2_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_clear_config_otp(eap_sm *sm) {
eap_peer_config *config;
config = eap_get_config(sm);
if (config) {
memset(config->otp, 0, config->otp_len);
free(config->otp);
config->otp = 0;
config->otp_len = 0;
}
} | void eap_clear_config_otp(struct eap_sm *sm) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return;
os_memset(config->otp, 0, config->otp_len);
os_free(config->otp);
config->otp = NULL;
config->otp_len = 0;
} | eap_clear_config_otp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_config_allowed_method(eap_sm *sm, eap_peer_config *config, int vendor,
u32 method) {
int i;
eap_method_type *m;
if (!config || !config->eap_methods)
return 1;
m = config->eap_methods;
for (i = 0; m[i].vendor || m[i].method; ++i) {
if (vendor == m[i].vendor && met... | static int eap_config_allowed_method(struct eap_sm *sm,
struct eap_peer_config *config, int vendor,
u32 method) {
int i;
struct eap_method_type *m;
if (config == NULL || config->eap_methods == NULL)
return 1;
m = config->eap_methods... | eap_config_allowed_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_deinit_prev_method(eap_sm *sm, const char *txt) {
sm->ext_pw_buf = 0;
if (sm->m) {
if (sm->eap_method_priv) {
wpa_printf(2,
"EAP: deinitialize previously used EAP method (%d, %s) at %s",
sm->selectedMethod, sm->m->name, txt);
((void (*)(eap_sm *, void *))sm... | static void eap_deinit_prev_method(struct eap_sm *sm, const char *txt) {
ext_password_free(sm->ext_pw_buf);
sm->ext_pw_buf = NULL;
if (sm->m == NULL || sm->eap_method_priv == NULL)
return;
wpa_printf(MSG_DEBUG,
"EAP: deinitialize previously used EAP method "
"(%d, %s) at %s",
... | eap_deinit_prev_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_erp_update_identity(eap_sm *sm, const u8 *eap, size_t len) { ; } | void eap_erp_update_identity(struct eap_sm *sm, const u8 *eap, size_t len) {
#ifdef CONFIG_ERP
const struct eap_hdr *hdr;
const u8 *pos, *end;
struct erp_tlvs parse;
if (len < sizeof(*hdr) + 1)
return;
hdr = (const struct eap_hdr *)eap;
end = eap + len;
pos = (const u8 *)(hdr + 1);
if (hdr->code !=... | eap_erp_update_identity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_add_pac(eap_fast_pac **pac_root, eap_fast_pac **pac_current,
eap_fast_pac *entry) {
eap_fast_pac *pac;
if (!entry || !entry->a_id)
return -1;
eap_fast_remove_pac(pac_root, pac_current, entry->a_id, entry->a_id_len,
entry->pac_type);
pac = (eap_fast_pa... | int eap_fast_add_pac(struct eap_fast_pac **pac_root,
struct eap_fast_pac **pac_current,
struct eap_fast_pac *entry) {
struct eap_fast_pac *pac;
if (entry == NULL || entry->a_id == NULL)
return -1;
eap_fast_remove_pac(pac_root, pac_current, entry->a_id, entry->a_id_l... | eap_fast_add_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_add_pac_data(eap_fast_pac *pac, char **buf, char **pos,
size_t *buf_len) {
int ret;
int reta;
ret = snprintf(*pos, &(*buf)[*buf_len] - *pos, "START\nPAC-Type=%d\n",
pac->pac_type);
if (os_snprintf_error_13(&(*buf)[*buf_len] - *pos, ret))
return -1;
... | static int eap_fast_add_pac_data(struct eap_fast_pac *pac, char **buf,
char **pos, size_t *buf_len) {
int ret;
ret = os_snprintf(*pos, *buf + *buf_len - *pos, "START\nPAC-Type=%d\n",
pac->pac_type);
if (os_snprintf_error(*buf + *buf_len - *pos, ret))
retur... | eap_fast_add_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_clear_pac_opaque_ext(eap_sm *sm, eap_fast_data *data) {
if (tls_connection_client_hello_ext(sm->ssl_ctx, data->ssl.conn, 35, 0, 0) >=
0)
return 0;
wpa_printf(2, "EAP-FAST: Failed to remove PAC-Opaque TLS extension");
return -1;
} | static int eap_fast_clear_pac_opaque_ext(struct eap_sm *sm,
struct eap_fast_data *data) {
if (tls_connection_client_hello_ext(sm->ssl_ctx, data->ssl.conn,
TLS_EXT_PAC_OPAQUE, NULL, 0) < 0) {
wpa_printf(MSG_DEBUG, "EAP-FAST: Failed to r... | eap_fast_clear_pac_opaque_ext | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_copy_buf(u8 **dst, size_t *dst_len, const u8 *src,
size_t src_len) {
if (src) {
*dst = (u8 *)os_memdup(src, src_len);
if (!*dst)
return -1;
*dst_len = src_len;
}
return 0;
} | static int eap_fast_copy_buf(u8 **dst, size_t *dst_len, const u8 *src,
size_t src_len) {
if (src) {
*dst = os_memdup(src, src_len);
if (*dst == NULL)
return -1;
*dst_len = src_len;
}
return 0;
} | eap_fast_copy_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_decrypt(eap_sm *sm, eap_fast_data *data, eap_method_ret *ret,
u8 identifier, const wpabuf *in_data, wpabuf **out_data) {
size_t v6;
size_t v8;
int res;
int resa;
wpabuf *in_decrypted[2];
in_decrypted[1] = (wpabuf *)__readfsqword(0x28u);
v6 = wpabuf_len_26(in_data);
wpa... | static int eap_fast_decrypt(struct eap_sm *sm, struct eap_fast_data *data,
struct eap_method_ret *ret, u8 identifier,
const struct wpabuf *in_data,
struct wpabuf **out_data) {
struct wpabuf *in_decrypted;
int res;
wpa_printf(MSG_... | eap_fast_decrypt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_deinit(eap_sm *sm, void *priv) {
eap_fast_pac *pac;
eap_fast_pac *prev;
if (priv) {
if (*((_QWORD *)priv + 13) && *((_QWORD *)priv + 12))
(*(void (**)(eap_sm *, _QWORD))(*((_QWORD *)priv + 12) + 24LL))(
sm, *((_QWORD *)priv + 13));
free(*((void **)priv + 16));
free(*((vo... | static void eap_fast_deinit(struct eap_sm *sm, void *priv) {
struct eap_fast_data *data = priv;
struct eap_fast_pac *pac, *prev;
if (data == NULL)
return;
if (data->phase2_priv && data->phase2_method)
data->phase2_method->deinit(sm, data->phase2_priv);
os_free(data->phase2_types);
os_free(data->key... | eap_fast_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_deinit_pac_data(eap_fast_read_ctx *rc) {
free(rc->buf);
if (rc->f)
fclose(rc->f);
} | static void eap_fast_deinit_pac_data(struct eap_fast_read_ctx *rc) {
os_free(rc->buf);
if (rc->f)
fclose(rc->f);
} | eap_fast_deinit_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_derive_eap_emsk(const u8 *simck, u8 *emsk) {
if (sha1_t_prf(simck, 0x28u, "Extended Session Key Generating Function",
&byte_266358, 0, emsk, 0x40u) < 0)
return -1;
wpa_hexdump_key(2, "EAP-FAST: Derived key (EMSK)", emsk, 0x40u);
return 0;
} | int eap_fast_derive_eap_emsk(const u8 *simck, u8 *emsk) {
if (sha1_t_prf(simck, EAP_FAST_SIMCK_LEN,
"Extended Session Key Generating Function", (u8 *)"", 0, emsk,
EAP_EMSK_LEN) < 0)
return -1;
wpa_hexdump_key(MSG_DEBUG, "EAP-FAST: Derived key (EMSK)", emsk,
E... | eap_fast_derive_eap_emsk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_derive_eap_msk(const u8 *simck, u8 *msk) {
if (sha1_t_prf(simck, 0x28u, "Session Key Generating Function", &byte_266358,
0, msk, 0x40u) < 0)
return -1;
wpa_hexdump_key(2, "EAP-FAST: Derived key (MSK)", msk, 0x40u);
return 0;
} | int eap_fast_derive_eap_msk(const u8 *simck, u8 *msk) {
if (sha1_t_prf(simck, EAP_FAST_SIMCK_LEN, "Session Key Generating Function",
(u8 *)"", 0, msk, EAP_FAST_KEY_LEN) < 0)
return -1;
wpa_hexdump_key(MSG_DEBUG, "EAP-FAST: Derived key (MSK)", msk,
EAP_FAST_KEY_LEN);
return ... | eap_fast_derive_eap_msk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.