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 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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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_7(pos); posb = pos + 2; alen = WPA_GET_LE16_7(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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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_7(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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const dpp_curve_params *dpp_get_curve_ike_group(u16 group) { int i; for (i = 0; dpp_curves[(long)i].name; ++i) { if (group == dpp_curves[(long)i].ike_group) return &dpp_curves[(long)i]; } return 0; }
const struct dpp_curve_params *dpp_get_curve_ike_group(u16 group) { int i; for (i = 0; dpp_curves[i].name; i++) { if (dpp_curves[i].ike_group == group) return &dpp_curves[i]; } return NULL; }
dpp_get_curve_ike_group
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const dpp_curve_params *dpp_get_curve_jwk_crv(const char *name) { int i; for (i = 0; dpp_curves[(long)i].name; ++i) { if (dpp_curves[(long)i].jwk_crv && !strcmp(name, dpp_curves[(long)i].jwk_crv)) return &dpp_curves[(long)i]; } return 0; }
const struct dpp_curve_params *dpp_get_curve_jwk_crv(const char *name) { int i; for (i = 0; dpp_curves[i].name; i++) { if (dpp_curves[i].jwk_crv && os_strcmp(name, dpp_curves[i].jwk_crv) == 0) return &dpp_curves[i]; } return NULL; }
dpp_get_curve_jwk_crv
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const dpp_curve_params *dpp_get_curve_name(const char *name) { int i; if (!name) return dpp_curves; for (i = 0; dpp_curves[(long)i].name; ++i) { if (!strcmp(name, dpp_curves[(long)i].name) || dpp_curves[(long)i].jwk_crv && !strcmp(name, dpp_curves[(long)i].jwk_crv)) { return &dp...
const struct dpp_curve_params *dpp_get_curve_name(const char *name) { int i; if (!name) return &dpp_curves[0]; for (i = 0; dpp_curves[i].name; i++) { if (os_strcmp(name, dpp_curves[i].name) == 0 || (dpp_curves[i].jwk_crv && os_strcmp(name, dpp_curves[i].jwk_crv) == 0)) return &dpp_curves[i...
dpp_get_curve_name
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_get_subject_public_key(dpp_bootstrap_info *bi, const u8 *data, size_t data_len) { u16 v4; int v5; crypto_ec_key *key; if (dpp_bi_pubkey_hash(bi, data, data_len) >= 0) { key = crypto_ec_key_parse_pub(data, data_len); if (key) { v4 = crypto_ec_key_group(key); ...
int dpp_get_subject_public_key(struct dpp_bootstrap_info *bi, const u8 *data, size_t data_len) { struct crypto_ec_key *key; if (dpp_bi_pubkey_hash(bi, data, data_len) < 0) { wpa_printf(MSG_DEBUG, "DPP: Failed to hash public key"); return -1; } key = crypto_ec_key_parse_p...
dpp_get_subject_public_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_global_clear(dpp_global *dpp) { if (dpp) { dpp_bootstrap_del(dpp, 0); dpp_configurator_del(dpp, 0); } }
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_global_deinit(dpp_global *dpp) { dpp_global_clear(dpp); free(dpp); }
void dpp_global_deinit(struct dpp_global *dpp) { dpp_global_clear(dpp); os_free(dpp); }
dpp_global_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
dpp_global *dpp_global_init(dpp_global_config *config) { dpp_global *dpp; dpp = (dpp_global *)os_zalloc(0x28u); if (!dpp) return 0; dl_list_init_12(&dpp->bootstrap); dl_list_init_12(&dpp->configurator); return dpp; }
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_hash_vector(const dpp_curve_params *curve, size_t num_elem, const u8 **addr, const size_t *len, u8 *mac) { switch (curve->hash_len) { case ' ': return sha256_vector(num_elem, addr, len, mac); case '0': return sha384_vector(num_elem, addr, len, mac); case '@': return sha51...
static int dpp_hash_vector(const struct dpp_curve_params *curve, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { if (curve->hash_len == 32) return sha256_vector(num_elem, addr, len, mac); if (curve->hash_len == 48) return sha384_vector(n...
dpp_hash_vector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, const char *label, u8 *out, size_t outlen) { size_t v6; size_t v8; size_t v9; switch (hash_len) { case ' ': v6 = strlen(label); return hmac_sha256_kdf(secret, secret_len, 0, (const u8 *)label, v6, out, ...
int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, const char *label, u8 *out, size_t outlen) { if (hash_len == 32) return hmac_sha256_kdf(secret, secret_len, NULL, (const u8 *)label, os_strlen(label), out, outlen); if (hash_len == 48) re...
dpp_hkdf_expand
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_hmac(size_t hash_len, const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) { switch (hash_len) { case ' ': return hmac_sha256(key, key_len, data, data_len, mac); case '0': return hmac_sha384(key, key_len, data, data_len, mac); case '@': return hmac_sha512(key...
static int dpp_hmac(size_t hash_len, const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) { if (hash_len == 32) return hmac_sha256(key, key_len, data, data_len, mac); if (hash_len == 48) return hmac_sha384(key, key_len, data, data_len, mac); if (hash_len == 64) ...
dpp_hmac
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, size_t num_elem, const u8 **addr, const size_t *len, u8 *mac) { switch (hash_len) { case ' ': return hmac_sha256_vector(key, key_len, num_elem, addr, len, mac); case '0': return hmac_sha384_vector(k...
int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { if (hash_len == 32) return hmac_sha256_vector(key, key_len, num_elem, addr, len, mac); if (hash_len == 48) return hmac_sha384_vector(ke...
dpp_hmac_vector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_key_expired(const char *timestamp, os_time_t *expiry) { unsigned int year; unsigned int month; unsigned int day; unsigned int hour; unsigned int min; unsigned int sec; int items; os_time_t utime; const char *pos; os_time now; unsigned long v13; v13 = __readfsqword(0x28u); if (strlen(t...
int dpp_key_expired(const char *timestamp, os_time_t *expiry) { struct os_time now; unsigned int year, month, day, hour, min, sec; os_time_t utime; const char *pos; if (os_strlen(timestamp) < 19) { wpa_printf(MSG_DEBUG, "DPP: Too short timestamp - assume expired key"); return 1; } if (sscanf(time...
dpp_key_expired
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
dpp_configurator *dpp_keygen_configurator(const char *curve, const u8 *privkey, size_t privkey_len, const u8 *pp_key, size_t pp_key_len) { crypto_ec_key *v6; crypto_ec_key *v7; dpp_configurator *conf; conf = (dpp_configurator *...
static struct dpp_configurator *dpp_keygen_configurator(const char *curve, const u8 *privkey, size_t privkey_len, const u8 *pp_key, ...
dpp_keygen_configurator
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *dpp_netrole_str(dpp_netrole netrole) { if (netrole == dpp_netrole_DPP_NETROLE_CONFIGURATOR) return "configurator"; if ((unsigned int)netrole > dpp_netrole_DPP_NETROLE_CONFIGURATOR) return "??"; if (netrole) return "ap"; return "sta"; }
static const char *dpp_netrole_str(enum dpp_netrole netrole) { switch (netrole) { case DPP_NETROLE_STA: return "sta"; case DPP_NETROLE_AP: return "ap"; case DPP_NETROLE_CONFIGURATOR: return "configurator"; default: return "??"; } }
dpp_netrole_str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
unsigned int dpp_next_configurator_id(dpp_global *dpp) { unsigned int max_id; dpp_configurator *conf; max_id = 0; for (conf = (dpp_configurator *)dpp->configurator.next; conf != (dpp_configurator *)&dpp->configurator; conf = (dpp_configurator *)conf->list.next) { if (max_id < conf->id) ...
static unsigned int dpp_next_configurator_id(struct dpp_global *dpp) { struct dpp_configurator *conf; unsigned int max_id = 0; dl_list_for_each(conf, &dpp->configurator, struct dpp_configurator, list) { if (conf->id > max_id) max_id = conf->id; } return max_id + 1; }
dpp_next_configurator_id
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
unsigned int dpp_next_id(dpp_global *dpp) { unsigned int max_id; dpp_bootstrap_info *bi; max_id = 0; for (bi = (dpp_bootstrap_info *)dpp->bootstrap.next; bi != (dpp_bootstrap_info *)&dpp->bootstrap; bi = (dpp_bootstrap_info *)bi->list.next) { if (max_id < bi->id) max_id = bi->id; } ...
unsigned int dpp_next_id(struct dpp_global *dpp) { struct dpp_bootstrap_info *bi; unsigned int max_id = 0; dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) { if (bi->id > max_id) max_id = bi->id; } return max_id + 1; }
dpp_next_id
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_nfc_update_bi(dpp_bootstrap_info *own_bi, dpp_bootstrap_info *peer_bi) { if (dpp_nfc_update_bi_channel(own_bi, peer_bi) >= 0 && dpp_nfc_update_bi_key(own_bi, peer_bi) >= 0) return 0; else return -1; }
int dpp_nfc_update_bi(struct dpp_bootstrap_info *own_bi, struct dpp_bootstrap_info *peer_bi) { if (dpp_nfc_update_bi_channel(own_bi, peer_bi) < 0 || dpp_nfc_update_bi_key(own_bi, peer_bi) < 0) return -1; return 0; }
dpp_nfc_update_bi
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_nfc_update_bi_channel(dpp_bootstrap_info *own_bi, dpp_bootstrap_info *peer_bi) { u8 op_class; u8 channel; unsigned int i; unsigned int freq; hostapd_hw_mode mode; char chan[24]; unsigned long v9; v9 = __readfsqword(0x28u); freq = 0; if (!peer_bi->num_freq && !p...
static int dpp_nfc_update_bi_channel(struct dpp_bootstrap_info *own_bi, struct dpp_bootstrap_info *peer_bi) { unsigned int i, freq = 0; enum hostapd_hw_mode mode; u8 op_class, channel; char chan[20]; if (peer_bi->num_freq == 0 && !peer_bi->channels_listed) return 0; ...
dpp_nfc_update_bi_channel
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_notify_new_qr_code(dpp_authentication *auth, dpp_bootstrap_info *peer_bi) { if (!auth || !auth->response_pending || memcmp(auth->waiting_pubkey_hash, peer_bi->pubkey_hash, 0x20u)) return 0; wpa_printf(2, "DPP: New scanned QR Code has matching public key that...
int dpp_notify_new_qr_code(struct dpp_authentication *auth, struct dpp_bootstrap_info *peer_bi) { if (!auth || !auth->response_pending || os_memcmp(auth->waiting_pubkey_hash, peer_bi->pubkey_hash, SHA256_MAC_LEN) != 0) return 0; wpa_printf(MSG_DEBUG, ...
dpp_notify_new_qr_code
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_connector(dpp_authentication *auth, dpp_config_obj *conf, const unsigned char *payload, u16 payload_len) { int ret; unsigned int rules; const dpp_curve_params *curve; json_token *token; crypto_ec_key *key; json_token *root; json_token *groups; json_token *id; json...
static int dpp_parse_connector(struct dpp_authentication *auth, struct dpp_config_obj *conf, const unsigned char *payload, u16 payload_len) { struct json_token *root, *groups, *netkey, *token; int ret = -1; struct crypto_ec_key *key = NULL; const str...
dpp_parse_connector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_cred_dpp(dpp_authentication *auth, dpp_config_obj *conf, json_token *cred) { size_t v4; int ret; const dpp_curve_params *key_curve; const dpp_curve_params *pp_curve; crypto_ec_key *csign_pub; crypto_ec_key *pp_pub; json_token *csign; json_token *ppkey; json_token *...
static int dpp_parse_cred_dpp(struct dpp_authentication *auth, struct dpp_config_obj *conf, struct json_token *cred) { struct dpp_signed_connector_info info; struct json_token *token, *csign, *ppkey; int ret = -1; struct crypto_ec_key *csign_pub = NULL...
dpp_parse_cred_dpp
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_cred_legacy(dpp_config_obj *conf, json_token *cred) { json_token *pass; json_token *psk_hex; size_t len; wpa_printf(2, "DPP: Legacy akm=psk credential"); pass = json_get_member(cred, "pass"); psk_hex = json_get_member(cred, "psk_hex"); if (pass && pass->type == json_type_JSON_STRING) { ...
static int dpp_parse_cred_legacy(struct dpp_config_obj *conf, struct json_token *cred) { struct json_token *pass, *psk_hex; wpa_printf(MSG_DEBUG, "DPP: Legacy akm=psk credential"); pass = json_get_member(cred, "pass"); psk_hex = json_get_member(cred, "psk_hex"); if (pass &&...
dpp_parse_cred_legacy
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
json_token *dpp_parse_own_connector(const char *own_connector) { size_t own_conn_len; const char *pos; const char *end; unsigned char *own_conn; json_token *own_root; unsigned long v7; v7 = __readfsqword(0x28u); pos = strchr(own_connector, 46); if (pos) { end = strchr(++pos, 46); if (end) { ...
struct json_token *dpp_parse_own_connector(const char *own_connector) { unsigned char *own_conn; size_t own_conn_len; const char *pos, *end; struct json_token *own_root; pos = os_strchr(own_connector, '.'); if (!pos) { wpa_printf(MSG_DEBUG, "DPP: Own connector is missing the first dot (.)"); return...
dpp_parse_own_connector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
dpp_bootstrap_info *dpp_parse_uri(const char *uri) { size_t v1; const char *pos; const char *chan_list; const char *mac; const char *info; const char *pk; const char *version; dpp_bootstrap_info *bi; char *end; chan_list = 0; mac = 0; info = 0; pk = 0; version = 0; v1 = strlen(uri); wpa...
static struct dpp_bootstrap_info *dpp_parse_uri(const char *uri) { const char *pos = uri; const char *end; const char *chan_list = NULL, *mac = NULL, *info = NULL, *pk = NULL; const char *version = NULL; struct dpp_bootstrap_info *bi; wpa_hexdump_ascii(MSG_DEBUG, "DPP: URI", uri, os_strlen(uri)); if (os...
dpp_parse_uri
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_uri_chan_list(dpp_bootstrap_info *bi, const char *chan_list) { unsigned int num_freq; int opclass; int channel; int freq; const char *pos2; opclass = -1; while (1) { if (!chan_list || !*chan_list || *chan_list == 59) return 0; for (pos2 = chan_list; *pos2 > 47 && *pos2 <= 57; ...
int dpp_parse_uri_chan_list(struct dpp_bootstrap_info *bi, const char *chan_list) { const char *pos = chan_list, *pos2; int opclass = -1, channel, freq; while (pos && *pos && *pos != ';') { pos2 = pos; while (*pos2 >= '0' && *pos2 <= '9') pos2++; if (*pos2 == '/') { ...
dpp_parse_uri_chan_list
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_uri_info(dpp_bootstrap_info *bi, const char *info) { char *end; if (!info) return 0; end = strchr(info, 59); if (!end) end = (char *)&info[strlen(info)]; bi->info = (char *)malloc(end - info + 1); if (!bi->info) return -1; memcpy(bi->info, info, end - info); bi->info[end - inf...
int dpp_parse_uri_info(struct dpp_bootstrap_info *bi, const char *info) { const char *end; if (!info) return 0; end = os_strchr(info, ';'); if (!end) end = info + os_strlen(info); bi->info = os_malloc(end - info + 1); if (!bi->info) return -1; os_memcpy(bi->info, info, end - info); bi->inf...
dpp_parse_uri_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_uri_mac(dpp_bootstrap_info *bi, const char *mac) { if (!mac) return 0; if (hwaddr_aton2(mac, bi->mac_addr) >= 0) { wpa_printf(2, "DPP: URI mac: %02x:%02x:%02x:%02x:%02x:%02x", bi->mac_addr[0], bi->mac_addr[1], bi->mac_addr[2], bi->mac_addr[3], bi->mac_addr[4], bi-...
int dpp_parse_uri_mac(struct dpp_bootstrap_info *bi, const char *mac) { if (!mac) return 0; if (hwaddr_aton2(mac, bi->mac_addr) < 0) { wpa_printf(MSG_DEBUG, "DPP: Invalid URI mac"); return -1; } wpa_printf(MSG_DEBUG, "DPP: URI mac: " MACSTR, MAC2STR(bi->mac_addr)); return 0; }
dpp_parse_uri_mac
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_uri_pk(dpp_bootstrap_info *bi, const char *info) { int res; size_t data_len; const char *end; u8 *data; unsigned long v7; v7 = __readfsqword(0x28u); end = strchr(info, 59); if (!end) return -1; data = base64_decode(info, end - info, &data_len); if (data) { wpa_hexdump(2, "DPP:...
static int dpp_parse_uri_pk(struct dpp_bootstrap_info *bi, const char *info) { u8 *data; size_t data_len; int res; const char *end; end = os_strchr(info, ';'); if (!end) return -1; data = base64_decode(info, end - info, &data_len); if (!data) { wpa_printf(MSG_DEBUG, "DPP: Invalid base64 encodi...
dpp_parse_uri_pk
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_parse_uri_version(dpp_bootstrap_info *bi, const char *version) { return 0; }
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
dpp_status_error dpp_peer_intro(dpp_introduction *intro, const char *own_connector, const u8 *net_access_key, size_t net_access_key_len, const u8 *csign_key, size_t csign_key_len, const u8 *pe...
enum dpp_status_error dpp_peer_intro(struct dpp_introduction *intro, const char *own_connector, const u8 *net_access_key, size_t net_access_key_len, const u8 *csign_key, size_t csign_key_len, const u8 *peer_connector, size_t peer_connector_len, os_time_t *expi...
dpp_peer_intro
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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 (pkex->identifier) attr_len = strlen(pkex...
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_point *dpp_pkex_derive_Qi(const dpp_curve_params *curve, const u8 *mac_init, const char *code, const char *identifier, crypto_ec **ret_ec) { size_t v5; unsigned int num_elem; crypto_ec_point *Qi; ...
struct crypto_ec_point *dpp_pkex_derive_Qi(const struct dpp_curve_params *curve, const u8 *mac_init, const char *code, const char *identifier, struct crypto_ec **ret_ec) { u8 hash[DPP_MAX_H...
dpp_pkex_derive_Qi
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_point *dpp_pkex_derive_Qr(const dpp_curve_params *curve, const u8 *mac_resp, const char *code, const char *identifier, crypto_ec **ret_ec) { size_t v5; unsigned int num_elem; crypto_ec_point *Qr; ...
struct crypto_ec_point *dpp_pkex_derive_Qr(const struct dpp_curve_params *curve, const u8 *mac_resp, const char *code, const char *identifier, struct crypto_ec **ret_ec) { u8 hash[DPP_MAX_H...
dpp_pkex_derive_Qr
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_pkex_derive_z(const u8 *mac_init, const u8 *mac_resp, u8 ver_init, u8 ver_resp, const u8 *Mx, size_t Mx_len, const u8 *Nx, size_t Nx_len, const char *code, const u8 *Kx, size_t Kx_len, u8 *z, unsigned int hash_len) { size_t v14; int res; u8...
int dpp_pkex_derive_z(const u8 *mac_init, const u8 *mac_resp, u8 ver_init, u8 ver_resp, const u8 *Mx, size_t Mx_len, const u8 *Nx, size_t Nx_len, const char *code, const u8 *Kx, size_t Kx_len, u8 *z, unsigned int hash_len) { u8 salt[DPP_MAX_HASH_LEN], ...
dpp_pkex_derive_z
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_pkex_fail(dpp_pkex *pkex, const char *txt) { wpa_msg(pkex->msg_ctx, 3, "DPP-FAIL %s", txt); }
static void dpp_pkex_fail(struct dpp_pkex *pkex, const char *txt) { wpa_msg(pkex->msg_ctx, MSG_INFO, DPP_EVENT_FAIL "%s", txt); }
dpp_pkex_fail
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_pkex_free(dpp_pkex *pkex) { if (pkex) { free(pkex->identifier); free(pkex->code); crypto_ec_key_deinit(pkex->x); crypto_ec_key_deinit(pkex->y); crypto_ec_key_deinit(pkex->peer_bootstrap_key); wpabuf_free(pkex->exchange_req); wpabuf_free(pkex->exchange_resp); free(pkex); } }
void dpp_pkex_free(struct dpp_pkex *pkex) { if (!pkex) return; os_free(pkex->identifier); os_free(pkex->code); crypto_ec_key_deinit(pkex->x); crypto_ec_key_deinit(pkex->y); crypto_ec_key_deinit(pkex->peer_bootstrap_key); wpabuf_free(pkex->exchange_req); wpabuf_free(pkex->exchange_resp); os_free(p...
dpp_pkex_free
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_key *dpp_pkex_get_role_elem(const dpp_curve_params *curve, int init) { const u8 *v2; const u8 *v3; const u8 *v4; const u8 *v5; const u8 *v6; const u8 *v7; crypto_ec_key *result; const u8 *v9; const u8 *x; switch (curve->ike_group) { case 0x13u: if (init) v2 = pkex_init_x_p256;...
static struct crypto_ec_key * dpp_pkex_get_role_elem(const struct dpp_curve_params *curve, int init) { const u8 *x, *y; switch (curve->ike_group) { case 19: x = init ? pkex_init_x_p256 : pkex_resp_x_p256; y = init ? pkex_init_y_p256 : pkex_resp_y_p256; break; case 20: x = init ? pkex_init_x_p38...
dpp_pkex_get_role_elem
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_pkex_identifier_match(const u8 *attr_id, u16 attr_id_len, const char *identifier) { if (attr_id || !identifier) { if (!attr_id || identifier) { if (!attr_id || !identifier || strlen(identifier) == attr_id_len && !memcmp(identifier, attr_id, attr_...
static int dpp_pkex_identifier_match(const u8 *attr_id, u16 attr_id_len, const char *identifier) { if (!attr_id && identifier) { wpa_printf(MSG_DEBUG, "DPP: No PKEX code identifier received, but expected one"); return 0; } if (attr_id && !identifier) { ...
dpp_pkex_identifier_match
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
dpp_pkex *dpp_pkex_init(void *msg_ctx, dpp_bootstrap_info *bi, const u8 *own_mac, const char *identifier, const char *code, bool v2) { dpp_pkex *pkex; pkex = (dpp_pkex *)os_zalloc(0x140u); if (!pkex) return 0; pkex->msg_ctx = msg_ctx; *((_BYTE *)pkex + 8) |...
struct dpp_pkex *dpp_pkex_init(void *msg_ctx, struct dpp_bootstrap_info *bi, const u8 *own_mac, const char *identifier, const char *code, bool v2) { struct dpp_pkex *pkex; #ifdef CONFIG_TESTING_OPTIONS if (!is_zero_ether_addr(dpp_pkex_own_mac_override))...
dpp_pkex_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_reconfig_derive_ke_initiator(dpp_authentication *auth, const u8 *r_proto, u16 r_proto_len, json_token *net_access_key) { int res; const dpp_curve_params *curve; crypto_ec_key *pr; crypto_ec_key *peer_key; crypto_ec *ec; crypto...
int dpp_reconfig_derive_ke_initiator(struct dpp_authentication *auth, const u8 *r_proto, u16 r_proto_len, struct json_token *net_access_key) { struct crypto_ec_key *pr = NULL, *peer_key = NULL; const struct crypto_ec_point *CR, *PR; const s...
dpp_reconfig_derive_ke_initiator
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_reconfig_derive_ke_responder(dpp_authentication *auth, const u8 *net_access_key, size_t net_access_key_len, json_token *peer_net_access_key) { long v4; long v5; long v6; long v7; int res; c...
int dpp_reconfig_derive_ke_responder(struct dpp_authentication *auth, const u8 *net_access_key, size_t net_access_key_len, struct json_token *peer_net_access_key) { struct crypto_ec_key *own_key = NULL, *pee...
dpp_reconfig_derive_ke_responder
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_set_configurator(dpp_authentication *auth, const char *cmd) { unsigned int v3; const char *cmda; int ret; char *tmp; size_t len; char *pos; char *posa; char *posb; cmda = cmd; tmp = 0; ret = -1; if (!cmd || auth->configurator_set) return 0; auth->configurator_set = 1; if (*cmd =...
int dpp_set_configurator(struct dpp_authentication *auth, const char *cmd) { const char *pos; char *tmp = NULL; int ret = -1; if (!cmd || auth->configurator_set) return 0; auth->configurator_set = 1; if (cmd[0] != ' ') { size_t len; len = os_strlen(cmd); tmp = os_malloc(len + 2); if (...
dpp_set_configurator
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_key *dpp_set_keypair(const dpp_curve_params **curve, const u8 *privkey, size_t privkey_len) { int group; crypto_ec_key *key; key = crypto_ec_key_parse_priv(privkey, privkey_len); if (key) { group = crypto_ec_key_group(key); if (group >= 0) { *curve = dpp_g...
struct crypto_ec_key *dpp_set_keypair(const struct dpp_curve_params **curve, const u8 *privkey, size_t privkey_len) { struct crypto_ec_key *key; int group; key = crypto_ec_key_parse_priv(privkey, privkey_len); if (!key) { wpa_printf(MSG_INFO, "DPP: Failed to parse priv...
dpp_set_keypair
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_key *dpp_set_pubkey_point(crypto_ec_key *group_key, const u8 *buf, size_t len) { int ike_group; ike_group = crypto_ec_key_group(group_key); if ((len & 1) != 0) return 0; if (ike_group >= 0) return crypto_ec_key_set_pub(ike_group, buf, &buf[len >> 1], len >>...
struct crypto_ec_key *dpp_set_pubkey_point(struct crypto_ec_key *group_key, const u8 *buf, size_t len) { int ike_group = crypto_ec_key_group(group_key); if (len & 1) return NULL; if (ike_group < 0) { wpa_printf(MSG_ERROR, "DPP: Could not get EC group"); ret...
dpp_set_pubkey_point
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dpp_uri_valid_info(const char *info) { const char *v1; unsigned char val; while (*info) { v1 = info++; val = *v1; if (*v1 <= 0x1Fu || val > 0x7Eu || val == 59) return 0; } return 1; }
static int dpp_uri_valid_info(const char *info) { while (*info) { unsigned char val = *info++; if (val < 0x20 || val > 0x7e || val == 0x3b) return 0; } return 1; }
dpp_uri_valid_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_write_adv_proto(wpabuf *buf) { wpabuf_put_u8_28(buf, 0x6Cu); wpabuf_put_u8_28(buf, 8u); wpabuf_put_u8_28(buf, 0x7Fu); wpabuf_put_u8_28(buf, 0xDDu); wpabuf_put_u8_28(buf, 5u); wpabuf_put_be24_0(buf, 0x506F9Au); wpabuf_put_u8_28(buf, 0x1Au); wpabuf_put_u8_28(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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void dpp_write_gas_query(wpabuf *buf, wpabuf *query) { u16 v2; v2 = wpabuf_len_53(query); wpabuf_put_le16_2(buf, v2); wpabuf_put_buf_13(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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_generate_scalar(const crypto_bignum *order, crypto_bignum *_rand, crypto_bignum *_mask, crypto_bignum *scalar) { int count; for (count = 0; count <= 99; ++count) { if (dragonfly_get_rand_2_to_r_1(_rand, order) && dragonfly_get_rand_2_to_r_1(_mask, order) && ...
int dragonfly_generate_scalar(const struct crypto_bignum *order, struct crypto_bignum *_rand, struct crypto_bignum *_mask, struct crypto_bignum *scalar) { int count; for (count = 0; count < 100; count++) { if (dragonfly_g...
dragonfly_generate_scalar
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_bignum *dragonfly_get_rand_1_to_p_1(const crypto_bignum *prime) { crypto_bignum *tmp; crypto_bignum *pm1; const crypto_bignum *one; tmp = crypto_bignum_init(); pm1 = crypto_bignum_init(); one = crypto_bignum_init_set(&buf, 1u); if (!tmp || !pm1 || !one || crypto_bignum_sub(prime, one, pm1) < 0 || ...
static struct crypto_bignum * dragonfly_get_rand_1_to_p_1(const struct crypto_bignum *prime) { struct crypto_bignum *tmp, *pm1, *one; tmp = crypto_bignum_init(); pm1 = crypto_bignum_init(); one = crypto_bignum_init_set((const u8 *)"\x01", 1); if (!tmp || !pm1 || !one || crypto_bignum_sub(prime, one, pm1) < 0...
dragonfly_get_rand_1_to_p_1
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_get_rand_2_to_r_1(crypto_bignum *val, const crypto_bignum *order) { return !crypto_bignum_rand(val, order) && !crypto_bignum_is_zero(val) && !crypto_bignum_is_one(val); }
static int dragonfly_get_rand_2_to_r_1(struct crypto_bignum *val, const struct crypto_bignum *order) { return crypto_bignum_rand(val, order) == 0 && !crypto_bignum_is_zero(val) && !crypto_bignum_is_one(val); }
dragonfly_get_rand_2_to_r_1
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_get_random_qr_qnr(const crypto_bignum *prime, crypto_bignum **qr, crypto_bignum **qnr) { int res; crypto_bignum *tmp; *qnr = 0; *qr = *qnr; while (!*qr || !*qnr) { tmp = crypto_bignum_init(); if (!tmp || crypto_bignum_rand(tmp, prime) < 0) { crypto_...
int dragonfly_get_random_qr_qnr(const struct crypto_bignum *prime, struct crypto_bignum **qr, struct crypto_bignum **qnr) { *qr = *qnr = NULL; while (!(*qr) || !(*qnr)) { struct crypto_bignum *tmp; int res; tmp = crypto_bignum_init(); ...
dragonfly_get_random_qr_qnr
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_is_quadratic_residue_blind(crypto_ec *ec, const u8 *qr, const u8 *qnr, const crypto_bignum *val) { unsigned int is_odd; int res; unsigned int resa; unsigned int mask; unsigned int maska; unsigned int check; con...
int dragonfly_is_quadratic_residue_blind(struct crypto_ec *ec, const u8 *qr, const u8 *qnr, const struct crypto_bignum *val) { struct crypto_bignum *r, *num, *qr_or_qnr = NULL; int check, res = -1; u8 qr_or_qnr_bin[DRAGONFLY_MAX_ECC...
dragonfly_is_quadratic_residue_blind
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
unsigned int dragonfly_min_pwe_loop_iter(int group) { if (group == 22 || group == 23 || group == 24) return 40; if (group == 1 || group == 2 || group == 5 || group == 14 || group == 15 || group == 16 || group == 17 || group == 18) return 1; return 40; }
unsigned int dragonfly_min_pwe_loop_iter(int group) { if (group == 22 || group == 23 || group == 24) { return 40; } if (group == 1 || group == 2 || group == 5 || group == 14 || group == 15 || group == 16 || group == 17 || group == 18) { return 1; } return 40; }
dragonfly_min_pwe_loop_iter
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_sqrt(crypto_ec *ec, const crypto_bignum *val, crypto_bignum *res) { int ret; const crypto_bignum *prime; size_t prime_len; crypto_bignum *tmp; crypto_bignum *one; u8 prime_bin[72]; unsigned long v11; v11 = __readfsqword(0x28u); ret = 0; prime = crypto_ec_get_prime(e...
int dragonfly_sqrt(struct crypto_ec *ec, const struct crypto_bignum *val, struct crypto_bignum *res) { const struct crypto_bignum *prime; struct crypto_bignum *tmp, *one; int ret = 0; u8 prime_bin[DRAGONFLY_MAX_ECC_PRIME_LEN]; size_t prime_len; prime = crypto_ec_get_prime(ec); prime_le...
dragonfly_sqrt
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int dragonfly_suitable_group(int group, int ecc_only) { return group == 19 || group == 20 || group == 21 || !ecc_only && (group == 15 || group == 16 || group == 17 || group == 18); }
int dragonfly_suitable_group(int group, int ecc_only) { return group == 19 || group == 20 || group == 21 || (!ecc_only && (group == 15 || group == 16 || group == 17 || group == 18)); }
dragonfly_suitable_group
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *driver_flag2_to_string(u64 flag2) { if (flag2 == 1) return "CONTROL_PORT_RX"; if (flag2 == 2) return "CONTROL_PORT_TX_STATUS"; return "UNKNOWN"; }
const char *driver_flag2_to_string(u64 flag2) { #define DF2S(x) \ case WPA_DRIVER_FLAGS2_##x: \ return #x switch (flag2) { DF2S(CONTROL_PORT_RX); DF2S(CONTROL_PORT_TX_STATUS); } return "UN...
driver_flag2_to_string
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
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
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_authenticate(void *priv, wpa_driver_auth_params *params) { return wpa_driver_nl80211_authenticate((i802_bss *)priv, params); }
static int driver_nl80211_authenticate(void *priv, struct wpa_driver_auth_params *params) { struct i802_bss *bss = priv; return wpa_driver_nl80211_authenticate(bss, params); }
driver_nl80211_authenticate
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_deauthenticate(void *priv, const u8 *addr, u16 reason_code) { return wpa_driver_nl80211_deauthenticate((i802_bss *)priv, addr, reason_code); }
static int driver_nl80211_deauthenticate(void *priv, const u8 *addr, u16 reason_code) { struct i802_bss *bss = priv; return wpa_driver_nl80211_deauthenticate(bss, addr, reason_code); }
driver_nl80211_deauthenticate
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void driver_nl80211_deinit(void *priv) { wpa_driver_nl80211_deinit((i802_bss *)priv); }
static void driver_nl80211_deinit(void *priv) { struct i802_bss *bss = priv; wpa_driver_nl80211_deinit(bss); }
driver_nl80211_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_if_remove(void *priv, wpa_driver_if_type type, const char *ifname) { return wpa_driver_nl80211_if_remove((i802_bss *)priv, type, ifname); }
static int driver_nl80211_if_remove(void *priv, enum wpa_driver_if_type type, const char *ifname) { struct i802_bss *bss = priv; return wpa_driver_nl80211_if_remove(bss, type, ifname); }
driver_nl80211_if_remove
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_probe_req_report(void *priv, int report) { return wpa_driver_nl80211_probe_req_report((i802_bss *)priv, report); }
static int driver_nl80211_probe_req_report(void *priv, int report) { struct i802_bss *bss = priv; return wpa_driver_nl80211_probe_req_report(bss, report); }
driver_nl80211_probe_req_report
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_read_sta_data(void *priv, hostap_sta_driver_data *data, const u8 *addr) { memset(data, 0, sizeof(hostap_sta_driver_data)); return i802_read_sta_data((i802_bss *)priv, data, addr); }
static int driver_nl80211_read_sta_data(void *priv, struct hostap_sta_driver_data *data, const u8 *addr) { struct i802_bss *bss = priv; os_memset(data, 0, sizeof(*data)); return i802_read_sta_data(bss, data, addr); }
driver_nl80211_read_sta_data
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_scan2(void *priv, wpa_driver_scan_params *params) { return wpa_driver_nl80211_scan((i802_bss *)priv, params); }
static int driver_nl80211_scan2(void *priv, struct wpa_driver_scan_params *params) { struct i802_bss *bss = priv; #ifdef CONFIG_DRIVER_NL80211_QCA struct wpa_driver_nl80211_data *drv = bss->drv; if (drv->scan_vendor_cmd_avail && !params->only_new_results) return wpa_driver_nl8...
driver_nl80211_scan2
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_send_action(void *priv, unsigned int freq, unsigned int wait_time, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *data, size_t data_len, int no_cck) { return wpa_driver_nl80211_send_action((i802_b...
static int driver_nl80211_send_action(void *priv, unsigned int freq, unsigned int wait_time, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *data, size_t data_len, ...
driver_nl80211_send_action
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_send_mlme(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq, const u16 *csa_offs, size_t csa_offs_len, int no_encrypt, unsigned int wait) { return wpa_driver_nl80211_send_mlme((i802_bss *)...
static int driver_nl80211_send_mlme(void *priv, const u8 *data, size_t data_len, int noack, unsigned int freq, const u16 *csa_offs, size_t csa_offs_len, int no_encrypt, unsigned int wait) { struct i802_bss *bss...
driver_nl80211_send_mlme
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_set_key(void *priv, wpa_driver_set_key_params *params) { return wpa_driver_nl80211_set_key((i802_bss *)priv, params); }
static int driver_nl80211_set_key(void *priv, struct wpa_driver_set_key_params *params) { struct i802_bss *bss = priv; return wpa_driver_nl80211_set_key(bss, params); }
driver_nl80211_set_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_set_sta_vlan(void *priv, const u8 *addr, const char *ifname, int vlan_id) { return i802_set_sta_vlan((i802_bss *)priv, addr, ifname, vlan_id); }
static int driver_nl80211_set_sta_vlan(void *priv, const u8 *addr, const char *ifname, int vlan_id) { struct i802_bss *bss = priv; return i802_set_sta_vlan(bss, addr, ifname, vlan_id); }
driver_nl80211_set_sta_vlan
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_sta_remove(void *priv, const u8 *addr) { return wpa_driver_nl80211_sta_remove((i802_bss *)priv, addr, -1, 0); }
static int driver_nl80211_sta_remove(void *priv, const u8 *addr) { struct i802_bss *bss = priv; return wpa_driver_nl80211_sta_remove(bss, addr, -1, 0); }
driver_nl80211_sta_remove
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_nl80211_sta_set_airtime_weight(void *priv, const u8 *addr, unsigned int weight) { char *v3; unsigned short weighta; int ret; nl_msg *msg; weighta = weight; wpa_printf(2, "nl80211: Set STA airtime weight - ifname=%s " "addr=%02x:...
static int driver_nl80211_sta_set_airtime_weight(void *priv, const u8 *addr, unsigned int weight) { struct i802_bss *bss = priv; struct nl_msg *msg; int ret; wpa_printf(MSG_DEBUG, "nl80211: Set STA airtime weight - ifname=%s addr=" MACSTR ...
driver_nl80211_sta_set_airtime_weight
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void driver_wired_deinit_common(driver_wired_common_data *common) { unsigned int v1; int v2; int flags; unsigned long v4; v4 = __readfsqword(0x28u); if (common->membership) { v1 = if_nametoindex(common->ifname); if (wired_multicast_membership(common->pf_sock, v1, pae_group_addr_0, 0) < 0) ...
void driver_wired_deinit_common(struct driver_wired_common_data *common) { int flags; if (common->membership && wired_multicast_membership( common->pf_sock, if_nametoindex(common->ifname), pae_group_addr, 0) < 0) { wpa_printf(MSG_DEBUG, "%s: Faile...
driver_wired_deinit_common
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_get_bssid(void *priv, u8 *bssid) { *(_DWORD *)bssid = *(_DWORD *)pae_group_addr_0; *((_WORD *)bssid + 2) = *(_WORD *)&pae_group_addr_0[4]; return 0; }
int driver_wired_get_bssid(void *priv, u8 *bssid) { os_memcpy(bssid, pae_group_addr, ETH_ALEN); return 0; }
driver_wired_get_bssid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_get_capa(void *priv, wpa_driver_capa *capa) { memset(capa, 0, sizeof(wpa_driver_capa)); capa->flags = 16; return 0; }
int driver_wired_get_capa(void *priv, struct wpa_driver_capa *capa) { os_memset(capa, 0, sizeof(*capa)); capa->flags = WPA_DRIVER_FLAGS_WIRED; return 0; }
driver_wired_get_capa
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_get_ifflags(const char *ifname, int *flags) { int *v2; char *v3; int *v5; char *v6; int s; ifreq ifr; unsigned long v9; v9 = __readfsqword(0x28u); s = socket(2, 2, 0); if (s >= 0) { memset(&ifr, 0, sizeof(ifr)); os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, 0x10u); if (ioc...
static int driver_wired_get_ifflags(const char *ifname, int *flags) { struct ifreq ifr; int s; s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { wpa_printf(MSG_ERROR, "socket: %s", strerror(errno)); return -1; } os_memset(&ifr, 0, sizeof(ifr)); os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); if (io...
driver_wired_get_ifflags
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_get_ssid(void *priv, u8 *ssid) { *ssid = 0; return 0; }
int driver_wired_get_ssid(void *priv, u8 *ssid) { ssid[0] = 0; return 0; }
driver_wired_get_ssid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_init_common(driver_wired_common_data *common, const char *ifname, void *ctx) { int *v3; char *v4; unsigned int v5; int v7; int flags; unsigned long v10; v10 = __readfsqword(0x28u); os_strlcpy(common->ifname, ifname, 0x11u); common->ctx = ctx; common->pf...
int driver_wired_init_common(struct driver_wired_common_data *common, const char *ifname, void *ctx) { int flags; os_strlcpy(common->ifname, ifname, sizeof(common->ifname)); common->ctx = ctx; #ifdef __linux__ common->pf_sock = socket(PF_PACKET, SOCK_DGRAM, 0); if (common->pf_so...
driver_wired_init_common
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_multi(const char *ifname, const u8 *addr, int add) { int *v3; char *v4; int v6; int *v7; char *v8; int s; ifreq ifr; unsigned long v12; v12 = __readfsqword(0x28u); s = socket(2, 2, 0); if (s >= 0) { memset(&ifr, 0, sizeof(ifr)); os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, ...
static int driver_wired_multi(const char *ifname, const u8 *addr, int add) { struct ifreq ifr; int s; #ifdef __sun__ return -1; #endif s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { wpa_printf(MSG_ERROR, "socket: %s", strerror(errno)); return -1; } os_memset(&ifr, 0, sizeof(ifr)); os_strlcp...
driver_wired_multi
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int driver_wired_set_ifflags(const char *ifname, int flags) { int *v2; char *v3; int *v5; char *v6; int s; ifreq ifr; unsigned long v9; v9 = __readfsqword(0x28u); s = socket(2, 2, 0); if (s >= 0) { memset(&ifr, 0, sizeof(ifr)); os_strlcpy(ifr.ifr_ifrn.ifrn_name, ifname, 0x10u); ifr.ifr_...
static int driver_wired_set_ifflags(const char *ifname, int flags) { struct ifreq ifr; int s; s = socket(PF_INET, SOCK_DGRAM, 0); if (s < 0) { wpa_printf(MSG_ERROR, "socket: %s", strerror(errno)); return -1; } os_memset(&ifr, 0, sizeof(ifr)); os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ); ifr.ifr...
driver_wired_set_ifflags
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *drv_br_net_param_str(drv_br_net_param param) { if (param) return 0; else return "arp_accept"; }
static const char *drv_br_net_param_str(enum drv_br_net_param param) { switch (param) { case DRV_BR_NET_PARAM_GARP_ACCEPT: return "arp_accept"; default: return NULL; } }
drv_br_net_param_str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *drv_br_port_attr_str(drv_br_port_attr attr) { if (attr == drv_br_port_attr_DRV_BR_PORT_ATTR_PROXYARP) return "proxyarp_wifi"; if (attr == drv_br_port_attr_DRV_BR_PORT_ATTR_HAIRPIN_MODE) return "hairpin_mode"; return 0; }
static const char *drv_br_port_attr_str(enum drv_br_port_attr attr) { switch (attr) { case DRV_BR_PORT_ATTR_PROXYARP: return "proxyarp_wifi"; case DRV_BR_PORT_ATTR_HAIRPIN_MODE: return "hairpin_mode"; } return NULL; }
drv_br_port_attr_str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0