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 |
|---|---|---|---|---|---|---|---|
wpabuf *dh_derive_shared(const wpabuf *peer_public, const wpabuf *own_private,
const dh_group *dh_0) {
u8 *v4;
size_t v5;
const u8 *v6;
size_t v7;
const u8 *v8;
size_t shared_len;
wpabuf *shared;
unsigned long v12;
v12 = __readfsqword(0x28u);
if (!dh_0 || !peer_public || !o... | struct wpabuf *dh_derive_shared(const struct wpabuf *peer_public,
const struct wpabuf *own_private,
const struct dh_group *dh) {
struct wpabuf *shared;
size_t shared_len;
if (dh == NULL || peer_public == NULL || own_private == NULL)
return NULL;... | dh_derive_shared | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const dh_group *dh_groups_get(int id) {
size_t i;
for (i = 0; i <= 0xA; ++i) {
if (id == dh_groups[i].id)
return &dh_groups[i];
}
return 0;
} | const struct dh_group *dh_groups_get(int id) {
size_t i;
for (i = 0; i < NUM_DH_GROUPS; i++) {
if (dh_groups[i].id == id)
return &dh_groups[i];
}
return NULL;
} | dh_groups_get | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dh_init(const dh_group *dh_0, wpabuf **priv) {
u8 *v3;
u8 *v4;
wpabuf *pv;
if (!dh_0)
return 0;
wpabuf_clear_free(*priv);
*priv = wpabuf_alloc(dh_0->prime_len);
if (!*priv)
return 0;
pv = wpabuf_alloc(dh_0->prime_len);
if (pv) {
v3 = (u8 *)wpabuf_mhead_12(pv);
v4 = (u8 *)wpabu... | struct wpabuf *dh_init(const struct dh_group *dh, struct wpabuf **priv) {
struct wpabuf *pv;
size_t pv_len;
if (dh == NULL)
return NULL;
wpabuf_clear_free(*priv);
*priv = wpabuf_alloc(dh->prime_len);
if (*priv == NULL)
return NULL;
pv_len = dh->prime_len;
pv = wpabuf_alloc(pv_len);
if (pv =... | dh_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dhcp_snoop_deinit(hostapd_data *hapd) {
l2_packet_deinit(hapd->sock_dhcp);
hapd->sock_dhcp = 0;
} | void dhcp_snoop_deinit(struct hostapd_data *hapd) {
l2_packet_deinit(hapd->sock_dhcp);
hapd->sock_dhcp = NULL;
} | dhcp_snoop_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dhcp_snoop_init(hostapd_data *hapd) {
int *v1;
char *v2;
hapd->sock_dhcp = x_snoop_get_l2_packet(
hapd, (void (*)(void *, const u8 *, const u8 *, size_t))handle_dhcp_0,
l2_packet_filter_type_L2_PACKET_FILTER_DHCP);
if (hapd->sock_dhcp)
return 0;
v1 = __errno_location();
v2 = strerror(*v... | int dhcp_snoop_init(struct hostapd_data *hapd) {
hapd->sock_dhcp =
x_snoop_get_l2_packet(hapd, handle_dhcp, L2_PACKET_FILTER_DHCP);
if (hapd->sock_dhcp == NULL) {
wpa_printf(MSG_DEBUG,
"dhcp_snoop: Failed to initialize L2 packet processing for DHCP "
"packet: %s",
... | dhcp_snoop_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void do_process_drv_event(i802_bss *bss, int cmd, nlattr **tb) {
const char *v3;
size_t v4;
const u8 *v5;
nlattr *v6;
nlattr *v7;
size_t v8;
const u8 *v9;
int external_scan_event;
wpa_driver_nl80211_data *drv;
nlattr *frame;
drv = bss->drv;
external_scan_event = 0;
frame = tb[51];
v3 = nl80... | static void do_process_drv_event(struct i802_bss *bss, int cmd,
struct nlattr **tb) {
struct wpa_driver_nl80211_data *drv = bss->drv;
int external_scan_event = 0;
struct nlattr *frame = tb[NL80211_ATTR_FRAME];
wpa_printf(MSG_DEBUG, "nl80211: Drv Event %d (%s) received for %s", ... | do_process_drv_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int domain_suffix_match(const u8 *val, size_t len, const char *match,
size_t match_len, int full) {
size_t i;
for (i = 0; i < len; ++i) {
if (!val[i]) {
wpa_printf(2, "TLS: Embedded null in a string - reject");
return 0;
}
}
if (match_len > len || full && match_len !... | static int domain_suffix_match(const u8 *val, size_t len, const char *match,
size_t match_len, int full) {
size_t i;
for (i = 0; i < len; i++) {
if (val[i] == '\0') {
wpa_printf(MSG_DEBUG, "TLS: Embedded null in a string - reject");
return 0;
}
}
if (match_le... | domain_suffix_match | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_bootstrap_info *dpp_add_nfc_uri(dpp_global *dpp, const char *uri) {
dpp_bootstrap_info *bi;
if (!dpp)
return 0;
bi = dpp_parse_uri(uri);
if (!bi)
return 0;
bi->type = dpp_bootstrap_type_DPP_BOOTSTRAP_NFC_URI;
bi->id = dpp_next_id(dpp);
dl_list_add_15(&dpp->bootstrap, &bi->list);
return bi;
... | struct dpp_bootstrap_info *dpp_add_nfc_uri(struct dpp_global *dpp,
const char *uri) {
struct dpp_bootstrap_info *bi;
if (!dpp)
return NULL;
bi = dpp_parse_uri(uri);
if (!bi)
return NULL;
bi->type = DPP_BOOTSTRAP_NFC_URI;
bi->id = dpp_next_id(dpp);
dl_l... | dpp_add_nfc_uri | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_bootstrap_info *dpp_add_qr_code(dpp_global *dpp, const char *uri) {
dpp_bootstrap_info *bi;
if (!dpp)
return 0;
bi = dpp_parse_uri(uri);
if (!bi)
return 0;
bi->type = dpp_bootstrap_type_DPP_BOOTSTRAP_QR_CODE;
bi->id = dpp_next_id(dpp);
dl_list_add_15(&dpp->bootstrap, &bi->list);
return bi;
... | struct dpp_bootstrap_info *dpp_add_qr_code(struct dpp_global *dpp,
const char *uri) {
struct dpp_bootstrap_info *bi;
if (!dpp)
return NULL;
bi = dpp_parse_uri(uri);
if (!bi)
return NULL;
bi->type = DPP_BOOTSTRAP_QR_CODE;
bi->id = dpp_next_id(dpp);
dl_l... | dpp_add_qr_code | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_akm_dpp(dpp_akm akm) {
return akm == dpp_akm_DPP_AKM_DPP || akm == dpp_akm_DPP_AKM_SAE_DPP ||
akm == dpp_akm_DPP_AKM_PSK_SAE_DPP;
} | int dpp_akm_dpp(enum dpp_akm akm) {
return akm == DPP_AKM_DPP || akm == DPP_AKM_SAE_DPP ||
akm == DPP_AKM_PSK_SAE_DPP;
} | dpp_akm_dpp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_akm dpp_akm_from_str(const char *akm) {
int dpp;
int psk;
int sae;
int dot1x;
const char *pos;
const char *posa;
dpp = 0;
psk = 0;
sae = 0;
dot1x = 0;
if (!strcmp(akm, "psk"))
return dpp_akm_DPP_AKM_PSK;
if (!strcmp(akm, "sae"))
return dpp_akm_DPP_AKM_SAE;
if (!strcmp(akm, "psk+sa... | static enum dpp_akm dpp_akm_from_str(const char *akm) {
const char *pos;
int dpp = 0, psk = 0, sae = 0, dot1x = 0;
if (os_strcmp(akm, "psk") == 0)
return DPP_AKM_PSK;
if (os_strcmp(akm, "sae") == 0)
return DPP_AKM_SAE;
if (os_strcmp(akm, "psk+sae") == 0)
return DPP_AKM_PSK_SAE;
if (os_strcmp(ak... | dpp_akm_from_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_akm_legacy(dpp_akm akm) {
return akm == dpp_akm_DPP_AKM_PSK || akm == dpp_akm_DPP_AKM_PSK_SAE ||
akm == dpp_akm_DPP_AKM_SAE;
} | int dpp_akm_legacy(enum dpp_akm akm) {
return akm == DPP_AKM_PSK || akm == DPP_AKM_PSK_SAE || akm == DPP_AKM_SAE;
} | dpp_akm_legacy | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_akm_psk(dpp_akm akm) {
return akm == dpp_akm_DPP_AKM_PSK || akm == dpp_akm_DPP_AKM_PSK_SAE ||
akm == dpp_akm_DPP_AKM_PSK_SAE_DPP;
} | int dpp_akm_psk(enum dpp_akm akm) {
return akm == DPP_AKM_PSK || akm == DPP_AKM_PSK_SAE ||
akm == DPP_AKM_PSK_SAE_DPP;
} | dpp_akm_psk | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_akm_sae(dpp_akm akm) {
return akm == dpp_akm_DPP_AKM_SAE || akm == dpp_akm_DPP_AKM_PSK_SAE ||
akm == dpp_akm_DPP_AKM_SAE_DPP || akm == dpp_akm_DPP_AKM_PSK_SAE_DPP;
} | int dpp_akm_sae(enum dpp_akm akm) {
return akm == DPP_AKM_SAE || akm == DPP_AKM_PSK_SAE ||
akm == DPP_AKM_SAE_DPP || akm == DPP_AKM_PSK_SAE_DPP;
} | dpp_akm_sae | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *dpp_akm_selector_str(dpp_akm akm) {
const char *result;
switch (akm) {
case dpp_akm_DPP_AKM_DPP:
result = "506F9A02";
break;
case dpp_akm_DPP_AKM_PSK:
result = "000FAC02+000FAC06";
break;
case dpp_akm_DPP_AKM_SAE:
result = "000FAC08";
break;
case dpp_akm_DPP_AKM_PSK_SAE:... | const char *dpp_akm_selector_str(enum dpp_akm akm) {
switch (akm) {
case DPP_AKM_DPP:
return "506F9A02";
case DPP_AKM_PSK:
return "000FAC02+000FAC06";
case DPP_AKM_SAE:
return "000FAC08";
case DPP_AKM_PSK_SAE:
return "000FAC02+000FAC06+000FAC08";
case DPP_AKM_SAE_DPP:
return "506F9A02+00... | dpp_akm_selector_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *dpp_akm_str(dpp_akm akm) {
const char *result;
switch (akm) {
case dpp_akm_DPP_AKM_DPP:
result = "dpp";
break;
case dpp_akm_DPP_AKM_PSK:
result = "psk";
break;
case dpp_akm_DPP_AKM_SAE:
result = "sae";
break;
case dpp_akm_DPP_AKM_PSK_SAE:
result = "psk+sae";
brea... | const char *dpp_akm_str(enum dpp_akm akm) {
switch (akm) {
case DPP_AKM_DPP:
return "dpp";
case DPP_AKM_PSK:
return "psk";
case DPP_AKM_SAE:
return "sae";
case DPP_AKM_PSK_SAE:
return "psk+sae";
case DPP_AKM_SAE_DPP:
return "dpp+sae";
case DPP_AKM_PSK_SAE_DPP:
return "dpp+psk+sae";... | dpp_akm_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_akm_ver2(dpp_akm akm) {
return akm == dpp_akm_DPP_AKM_SAE_DPP || akm == dpp_akm_DPP_AKM_PSK_SAE_DPP;
} | int dpp_akm_ver2(enum dpp_akm akm) {
return akm == DPP_AKM_SAE_DPP || akm == DPP_AKM_PSK_SAE_DPP;
} | dpp_akm_ver2 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_authentication *dpp_alloc_auth(dpp_global *dpp, void *msg_ctx) {
dpp_authentication *auth;
auth = (dpp_authentication *)os_zalloc(0xCA8u);
if (!auth)
return 0;
auth->global = dpp;
auth->msg_ctx = msg_ctx;
auth->conf_resp_status = 255;
return auth;
} | struct dpp_authentication *dpp_alloc_auth(struct dpp_global *dpp,
void *msg_ctx) {
struct dpp_authentication *auth;
auth = os_zalloc(sizeof(*auth));
if (!auth)
return NULL;
auth->global = dpp;
auth->msg_ctx = msg_ctx;
auth->conf_resp_status = 255;
return auth... | dpp_alloc_auth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_alloc_msg(dpp_public_action_frame_type type, size_t len) {
wpabuf *msg;
msg = wpabuf_alloc(len + 8);
if (!msg)
return 0;
wpabuf_put_u8_28(msg, 4u);
wpabuf_put_u8_28(msg, 9u);
wpabuf_put_be24_0(msg, 0x506F9Au);
wpabuf_put_u8_28(msg, 0x1Au);
wpabuf_put_u8_28(msg, 1u);
wpabuf_put_u8_28(m... | struct wpabuf *dpp_alloc_msg(enum dpp_public_action_frame_type type,
size_t len) {
struct wpabuf *msg;
msg = wpabuf_alloc(8 + len);
if (!msg)
return NULL;
wpabuf_put_u8(msg, WLAN_ACTION_PUBLIC);
wpabuf_put_u8(msg, WLAN_PA_VENDOR_SPECIFIC);
wpabuf_put_be24(msg, OUI_WFA);
w... | dpp_alloc_msg | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_auth_build_conf(dpp_authentication *auth, dpp_status_error status) {
u8 *i_pubkey_hash;
size_t i_auth_len;
size_t r_nonce_len;
wpabuf *msg;
u8 *attr_start;
u8 *r_pubkey_hash;
u8 *attr_end;
u8 *wrapped_r_nonce;
u8 *wrapped_i_auth;
const u8 *addr[2];
size_t len[2];
u8 r_nonce[48];
u8... | static struct wpabuf *dpp_auth_build_conf(struct dpp_authentication *auth,
enum dpp_status_error status) {
struct wpabuf *msg;
u8 i_auth[4 + DPP_MAX_HASH_LEN];
size_t i_auth_len;
u8 r_nonce[4 + DPP_MAX_NONCE_LEN];
size_t r_nonce_len;
const u8 *addr[2];
size_t len[... | dpp_auth_build_conf | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_auth_build_req(dpp_authentication *auth, const wpabuf *pi,
size_t nonce_len, const u8 *r_pubkey_hash,
const u8 *i_pubkey_hash, unsigned int neg_freq) {
size_t v6;
u16 v8;
u8 *v9;
u8 op_class;
u8 channel;
size_t attr_len;
wpabuf *msg;
u8 *... | static struct wpabuf *
dpp_auth_build_req(struct dpp_authentication *auth, const struct wpabuf *pi,
size_t nonce_len, const u8 *r_pubkey_hash,
const u8 *i_pubkey_hash, unsigned int neg_freq) {
struct wpabuf *msg;
u8 clear[4 + DPP_MAX_NONCE_LEN + 4 + 1];
u8 wrapped_data[4 + DP... | dpp_auth_build_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_auth_build_resp(dpp_authentication *auth, dpp_status_error status,
const wpabuf *pr, size_t nonce_len,
const u8 *r_pubkey_hash, const u8 *i_pubkey_hash,
const u8 *r_nonce, const u8 *i_nonce,
const... | static struct wpabuf *dpp_auth_build_resp(
struct dpp_authentication *auth, enum dpp_status_error status,
const struct wpabuf *pr, size_t nonce_len, const u8 *r_pubkey_hash,
const u8 *i_pubkey_hash, const u8 *r_nonce, const u8 *i_nonce,
const u8 *wrapped_r_auth, size_t wrapped_r_auth_len, const u8 *siv_... | dpp_auth_build_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_build_resp_ok(dpp_authentication *auth) {
int ret;
size_t secret_len;
wpabuf *pr;
const u8 *i_pubkey_hash;
size_t nonce_len;
size_t wrapped_r_auth_len;
u8 *w_r_auth;
const u8 *r_pubkey_hash;
const u8 *i_nonce;
const u8 *r_nonce;
wpabuf *msg;
u8 r_auth[80];
u8 wrapped_r_auth[88];
... | static int dpp_auth_build_resp_ok(struct dpp_authentication *auth) {
size_t nonce_len;
size_t secret_len;
struct wpabuf *msg, *pr = NULL;
u8 r_auth[4 + DPP_MAX_HASH_LEN];
u8 wrapped_r_auth[4 + DPP_MAX_HASH_LEN + AES_BLOCK_SIZE], *w_r_auth;
size_t wrapped_r_auth_len;
int ret = -1;
const u8 *r_pubkey_hash... | dpp_auth_build_resp_ok | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_build_resp_status(dpp_authentication *auth,
dpp_status_error status) {
u8 *i_pubkey_hash;
wpabuf *msg;
if (!auth->own_bi)
return -1;
wpa_printf(2, "DPP: Build Authentication Response");
if (auth->peer_bi)
i_pubkey_hash = auth->peer_bi->pubkey_hash;
else
... | static int dpp_auth_build_resp_status(struct dpp_authentication *auth,
enum dpp_status_error status) {
struct wpabuf *msg;
const u8 *r_pubkey_hash, *i_pubkey_hash, *i_nonce;
#ifdef CONFIG_TESTING_OPTIONS
u8 test_hash[SHA256_MAC_LEN];
#endif
if (!auth->own_bi)
return -1... | dpp_auth_build_resp_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_conf_rx(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
signed long attr_lena;
u16 r_bootstrap_len;
u16 i_bootstrap_len;
u16 wrapped_data_len;
u16 status_len;
u16 i_auth_len;
u8 *unwrapped;
size_t unwrapped_len;
const u8 *wrapped_data... | int dpp_auth_conf_rx(struct dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
const u8 *r_bootstrap, *i_bootstrap, *wrapped_data, *status, *i_auth;
u16 r_bootstrap_len, i_bootstrap_len, wrapped_data_len, status_len,
i_auth_len;
const u8 *addr[2];
size_t... | dpp_auth_conf_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_conf_rx_failure(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len,
const u8 *wrapped_data, u16 wrapped_data_len,
dpp_status_error status) {
u16 r_nonce_len;
u8 *unwrapped;
size_t unwrap... | static int dpp_auth_conf_rx_failure(struct dpp_authentication *auth,
const u8 *hdr, const u8 *attr_start,
size_t attr_len, const u8 *wrapped_data,
u16 wrapped_data_len,
enum dp... | dpp_auth_conf_rx_failure | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_auth_deinit(dpp_authentication *auth) {
unsigned int i;
if (auth) {
dpp_configuration_free(auth->conf_ap);
dpp_configuration_free(auth->conf2_ap);
dpp_configuration_free(auth->conf_sta);
dpp_configuration_free(auth->conf2_sta);
crypto_ec_key_deinit(auth->own_protocol_key);
crypto_e... | void dpp_auth_deinit(struct dpp_authentication *auth) {
unsigned int i;
if (!auth)
return;
dpp_configuration_free(auth->conf_ap);
dpp_configuration_free(auth->conf2_ap);
dpp_configuration_free(auth->conf_sta);
dpp_configuration_free(auth->conf2_sta);
crypto_ec_key_deinit(auth->own_protocol_key);
cr... | dpp_auth_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_derive_l_initiator(dpp_authentication *auth) {
int v1;
int ret;
crypto_ec_point *L;
crypto_ec_point *sum;
crypto_bignum *lx;
crypto_ec *ec;
const crypto_ec_point *BR;
const crypto_ec_point *PR;
const crypto_bignum *bI;
L = 0;
sum = 0;
lx = 0;
ret = -1;
v1 = crypto_ec_key_group(... | int dpp_auth_derive_l_initiator(struct dpp_authentication *auth) {
struct crypto_ec *ec;
struct crypto_ec_point *L = NULL, *sum = NULL;
const struct crypto_ec_point *BR, *PR;
const struct crypto_bignum *bI;
struct crypto_bignum *lx = NULL;
int ret = -1;
ec = crypto_ec_init(crypto_ec_key_group(auth->peer_... | dpp_auth_derive_l_initiator | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_auth_derive_l_responder(dpp_authentication *auth) {
int v1;
int ret;
crypto_ec_point *L;
crypto_bignum *sum;
crypto_bignum *lx;
crypto_ec *ec;
const crypto_bignum *q;
const crypto_ec_point *BI;
const crypto_bignum *bR;
const crypto_bignum *pR;
L = 0;
sum = 0;
lx = 0;
ret = -1;
v1 ... | int dpp_auth_derive_l_responder(struct dpp_authentication *auth) {
struct crypto_ec *ec;
struct crypto_ec_point *L = NULL;
const struct crypto_ec_point *BI;
const struct crypto_bignum *bR, *pR, *q;
struct crypto_bignum *sum = NULL, *lx = NULL;
int ret = -1;
ec = crypto_ec_init(crypto_ec_key_group(auth->p... | dpp_auth_derive_l_responder | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_auth_fail(dpp_authentication *auth, const char *txt) {
wpa_msg(auth->msg_ctx, 3, "DPP-FAIL %s", txt);
} | void dpp_auth_fail(struct dpp_authentication *auth, const char *txt) {
wpa_msg(auth->msg_ctx, MSG_INFO, DPP_EVENT_FAIL "%s", txt);
} | dpp_auth_fail | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_authentication *dpp_auth_init(dpp_global *dpp, void *msg_ctx,
dpp_bootstrap_info *peer_bi,
dpp_bootstrap_info *own_bi,
u8 dpp_allowed_roles, unsigned int neg_freq,
hostapd_hw_modes... | struct dpp_authentication *dpp_auth_init(
struct dpp_global *dpp, void *msg_ctx, struct dpp_bootstrap_info *peer_bi,
struct dpp_bootstrap_info *own_bi, u8 dpp_allowed_roles,
unsigned int neg_freq, struct hostapd_hw_modes *own_modes, u16 num_modes) {
struct dpp_authentication *auth;
size_t nonce_len;
s... | dpp_auth_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_authentication *dpp_auth_req_rx(dpp_global *dpp, void *msg_ctx,
u8 dpp_allowed_roles, int qr_mutual,
dpp_bootstrap_info *peer_bi,
dpp_bootstrap_info *own_bi,
unsigned int f... | struct dpp_authentication *
dpp_auth_req_rx(struct dpp_global *dpp, void *msg_ctx, u8 dpp_allowed_roles,
int qr_mutual, struct dpp_bootstrap_info *peer_bi,
struct dpp_bootstrap_info *own_bi, unsigned int freq,
const u8 *hdr, const u8 *attr_start, size_t attr_len) {
stru... | dpp_auth_req_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_auth_resp_rx(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
const char *v5;
signed long attr_lena;
u8 role;
u16 r_bootstrap_len;
u16 i_bootstrap_len;
u16 wrapped_data_len;
u16 status_len;
u16 r_proto_len;
u16 r_nonce_len;
u16 i_... | struct wpabuf *dpp_auth_resp_rx(struct dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
struct crypto_ec_key *pr;
size_t secret_len;
const u8 *addr[2];
size_t len[2];
u8 *unwrapped = NULL, *unwrapped2 = NULL;
size_t unwrapped_len = 0, unwrappe... | dpp_auth_resp_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_auth_resp_rx_status(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len,
const u8 *wrapped_data, u16 wrapped_data_len,
dpp_status_error status) {
char *uri;
u8 role;
u16 i_nonce_len;
u16 r_... | static void dpp_auth_resp_rx_status(struct dpp_authentication *auth,
const u8 *hdr, const u8 *attr_start,
size_t attr_len, const u8 *wrapped_data,
u16 wrapped_data_len,
enum dp... | dpp_auth_resp_rx_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_auth_success(dpp_authentication *auth) {
wpa_printf(2, "DPP: Authentication success - clear temporary keys");
memset(auth->Mx, 0, sizeof(auth->Mx));
auth->Mx_len = 0;
memset(auth->Nx, 0, sizeof(auth->Nx));
auth->Nx_len = 0;
memset(auth->Lx, 0, sizeof(auth->Lx));
auth->Lx_len = 0;
memset(auth->k... | static void dpp_auth_success(struct dpp_authentication *auth) {
wpa_printf(MSG_DEBUG, "DPP: Authentication success - clear temporary keys");
os_memset(auth->Mx, 0, sizeof(auth->Mx));
auth->Mx_len = 0;
os_memset(auth->Nx, 0, sizeof(auth->Nx));
auth->Nx_len = 0;
os_memset(auth->Lx, 0, sizeof(auth->Lx));
aut... | dpp_auth_success | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_autogen_bootstrap_key(dpp_authentication *auth) {
dpp_bootstrap_info *bi;
if (auth->own_bi)
return 0;
bi = (dpp_bootstrap_info *)os_zalloc(0x128u);
if (!bi)
return -1;
bi->type = dpp_bootstrap_type_DPP_BOOTSTRAP_QR_CODE;
if (dpp_keygen(bi, auth->peer_bi->curve->name, 0, 0) < 0 ||
dpp_... | static int dpp_autogen_bootstrap_key(struct dpp_authentication *auth) {
struct dpp_bootstrap_info *bi;
if (auth->own_bi)
return 0;
bi = os_zalloc(sizeof(*bi));
if (!bi)
return -1;
bi->type = DPP_BOOTSTRAP_QR_CODE;
if (dpp_keygen(bi, auth->peer_bi->curve->name, NULL, 0) < 0 ||
dpp_gen_uri(bi)... | dpp_autogen_bootstrap_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bi_pubkey_hash(dpp_bootstrap_info *bi, const u8 *data,
size_t data_len) {
const u8 *addr[2];
size_t len[3];
unsigned long v7;
v7 = __readfsqword(0x28u);
addr[0] = data;
len[0] = data_len;
if (sha256_vector(1u, addr, len, bi->pubkey_hash) < 0)
return -1;
wpa_hexdump(2,... | int dpp_bi_pubkey_hash(struct dpp_bootstrap_info *bi, const u8 *data,
size_t data_len) {
const u8 *addr[2];
size_t len[2];
addr[0] = data;
len[0] = data_len;
if (sha256_vector(1, addr, len, bi->pubkey_hash) < 0)
return -1;
wpa_hexdump(MSG_DEBUG, "DPP: Public key hash", bi->pubkey... | dpp_bi_pubkey_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bootstrap_del(dpp_global *dpp, unsigned int id) {
int found;
dpp_bootstrap_info *bi;
dpp_bootstrap_info *tmp;
found = 0;
if (!dpp)
return -1;
bi = (dpp_bootstrap_info *)dpp->bootstrap.next;
tmp = (dpp_bootstrap_info *)bi->list.next;
while (bi != (dpp_bootstrap_info *)&dpp->bootstrap) {
... | static int dpp_bootstrap_del(struct dpp_global *dpp, unsigned int id) {
struct dpp_bootstrap_info *bi, *tmp;
int found = 0;
if (!dpp)
return -1;
dl_list_for_each_safe(bi, tmp, &dpp->bootstrap, struct dpp_bootstrap_info,
list) {
if (id && bi->id != id)
continue;
found ... | dpp_bootstrap_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_bootstrap_find_pair(dpp_global *dpp, const u8 *i_bootstrap,
const u8 *r_bootstrap, dpp_bootstrap_info **own_bi,
dpp_bootstrap_info **peer_bi) {
dpp_bootstrap_info *bi;
*own_bi = 0;
*peer_bi = 0;
if (dpp) {
for (bi = (dpp_bootstrap_info *)dp... | void dpp_bootstrap_find_pair(struct dpp_global *dpp, const u8 *i_bootstrap,
const u8 *r_bootstrap,
struct dpp_bootstrap_info **own_bi,
struct dpp_bootstrap_info **peer_bi) {
struct dpp_bootstrap_info *bi;
*own_bi = NULL;
*peer... | dpp_bootstrap_find_pair | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bootstrap_gen(dpp_global *dpp, const char *cmd) {
int ret;
char *mac;
char *info;
char *curve;
char *key;
u8 *privkey;
size_t privkey_len;
dpp_bootstrap_info *bi;
mac = 0;
info = 0;
curve = 0;
key = 0;
privkey = 0;
privkey_len = 0;
ret = -1;
if (!dpp)
return -1;
bi = (dpp_... | int dpp_bootstrap_gen(struct dpp_global *dpp, const char *cmd) {
char *mac = NULL, *info = NULL, *curve = NULL;
char *key = NULL;
u8 *privkey = NULL;
size_t privkey_len = 0;
int ret = -1;
struct dpp_bootstrap_info *bi;
if (!dpp)
return -1;
bi = os_zalloc(sizeof(*bi));
if (!bi)
goto fail;
... | dpp_bootstrap_gen | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_bootstrap_info *dpp_bootstrap_get_id(dpp_global *dpp, unsigned int id) {
dpp_bootstrap_info *bi;
if (!dpp)
return 0;
for (bi = (dpp_bootstrap_info *)dpp->bootstrap.next;
bi != (dpp_bootstrap_info *)&dpp->bootstrap;
bi = (dpp_bootstrap_info *)bi->list.next) {
if (id == bi->id)
retu... | struct dpp_bootstrap_info *dpp_bootstrap_get_id(struct dpp_global *dpp,
unsigned int id) {
struct dpp_bootstrap_info *bi;
if (!dpp)
return NULL;
dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) {
if (bi->id == id)
return bi;
}... | dpp_bootstrap_get_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *dpp_bootstrap_get_uri(dpp_global *dpp, unsigned int id) {
dpp_bootstrap_info *bi;
bi = dpp_bootstrap_get_id(dpp, id);
if (bi)
return bi->uri;
else
return 0;
} | const char *dpp_bootstrap_get_uri(struct dpp_global *dpp, unsigned int id) {
struct dpp_bootstrap_info *bi;
bi = dpp_bootstrap_get_id(dpp, id);
if (!bi)
return NULL;
return bi->uri;
} | dpp_bootstrap_get_uri | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_bootstrap_info_free(dpp_bootstrap_info *info) {
if (info) {
free(info->uri);
free(info->info);
free(info->chan);
free(info->pk);
crypto_ec_key_deinit(info->pubkey);
str_clear_free(info->configurator_params);
free(info);
}
} | void dpp_bootstrap_info_free(struct dpp_bootstrap_info *info) {
if (!info)
return;
os_free(info->uri);
os_free(info->info);
os_free(info->chan);
os_free(info->pk);
crypto_ec_key_deinit(info->pubkey);
str_clear_free(info->configurator_params);
os_free(info);
} | dpp_bootstrap_info_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bootstrap_key_hash(dpp_bootstrap_info *bi) {
size_t v2;
const u8 *v3;
int res;
wpabuf *der;
der = crypto_ec_key_get_subject_public_key(bi->pubkey);
if (!der)
return -1;
wpa_hexdump_buf_14(2, "DPP: Compressed public key (DER)", der);
v2 = wpabuf_len_55(der);
v3 = (const u8 *)wpabuf_head_55... | int dpp_bootstrap_key_hash(struct dpp_bootstrap_info *bi) {
struct wpabuf *der;
int res;
der = crypto_ec_key_get_subject_public_key(bi->pubkey);
if (!der)
return -1;
wpa_hexdump_buf(MSG_DEBUG, "DPP: Compressed public key (DER)", der);
res = dpp_bi_pubkey_hash(bi, wpabuf_head(der), wpabuf_len(der));
i... | dpp_bootstrap_key_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bootstrap_remove(dpp_global *dpp, const char *id) {
int id_val;
if (!strcmp(id, "*")) {
id_val = 0;
} else {
id_val = atoi(id);
if (!id_val)
return -1;
}
return dpp_bootstrap_del(dpp, id_val);
} | int dpp_bootstrap_remove(struct dpp_global *dpp, const char *id) {
unsigned int id_val;
if (os_strcmp(id, "*") == 0) {
id_val = 0;
} else {
id_val = atoi(id);
if (id_val == 0)
return -1;
}
return dpp_bootstrap_del(dpp, id_val);
} | dpp_bootstrap_remove | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_bootstrap_set(dpp_global *dpp, int id, const char *params) {
dpp_bootstrap_info *bi;
bi = dpp_bootstrap_get_id(dpp, id);
if (!bi)
return -1;
str_clear_free(bi->configurator_params);
if (params) {
bi->configurator_params = strdup(params);
if (bi->configurator_params)
return 0;
el... | int dpp_bootstrap_set(struct dpp_global *dpp, int id, const char *params) {
struct dpp_bootstrap_info *bi;
bi = dpp_bootstrap_get_id(dpp, id);
if (!bi)
return -1;
str_clear_free(bi->configurator_params);
if (params) {
bi->configurator_params = os_strdup(params);
return bi->configurator_params ?... | dpp_bootstrap_set | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *dpp_bootstrap_type_txt(dpp_bootstrap_type type) {
if (type == dpp_bootstrap_type_DPP_BOOTSTRAP_NFC_URI)
return "NFC-URI";
if ((unsigned int)type > dpp_bootstrap_type_DPP_BOOTSTRAP_NFC_URI)
return "??";
if (type)
return "PKEX";
return "QRCODE";
} | const char *dpp_bootstrap_type_txt(enum dpp_bootstrap_type type) {
switch (type) {
case DPP_BOOTSTRAP_QR_CODE:
return "QRCODE";
case DPP_BOOTSTRAP_PKEX:
return "PKEX";
case DPP_BOOTSTRAP_NFC_URI:
return "NFC-URI";
}
return "??";
} | dpp_bootstrap_type_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_build_attr_i_bootstrap_key_hash(wpabuf *msg, const u8 *hash) {
if (hash) {
wpa_printf(2, "DPP: I-Bootstrap Key Hash");
wpabuf_put_le16_3(msg, 0x1001u);
wpabuf_put_le16_3(msg, 0x20u);
wpabuf_put_data_37(msg, hash, 0x20u);
}
} | static void dpp_build_attr_i_bootstrap_key_hash(struct wpabuf *msg,
const u8 *hash) {
if (hash) {
wpa_printf(MSG_DEBUG, "DPP: I-Bootstrap Key Hash");
wpabuf_put_le16(msg, DPP_ATTR_I_BOOTSTRAP_KEY_HASH);
wpabuf_put_le16(msg, SHA256_MAC_LEN);
wpabuf_put_da... | dpp_build_attr_i_bootstrap_key_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_build_attr_r_bootstrap_key_hash(wpabuf *msg, const u8 *hash) {
if (hash) {
wpa_printf(2, "DPP: R-Bootstrap Key Hash");
wpabuf_put_le16_2(msg, 0x1002u);
wpabuf_put_le16_2(msg, 0x20u);
wpabuf_put_data_36(msg, hash, 0x20u);
}
} | void dpp_build_attr_r_bootstrap_key_hash(struct wpabuf *msg, const u8 *hash) {
if (hash) {
wpa_printf(MSG_DEBUG, "DPP: R-Bootstrap Key Hash");
wpabuf_put_le16(msg, DPP_ATTR_R_BOOTSTRAP_KEY_HASH);
wpabuf_put_le16(msg, SHA256_MAC_LEN);
wpabuf_put_data(msg, hash, SHA256_MAC_LEN);
}
} | dpp_build_attr_r_bootstrap_key_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_build_attr_status(wpabuf *msg, dpp_status_error status) {
wpa_printf(2, "DPP: Status %d", status);
wpabuf_put_le16_2(msg, 0x1000u);
wpabuf_put_le16_2(msg, 1u);
wpabuf_put_u8_28(msg, status);
} | void dpp_build_attr_status(struct wpabuf *msg, enum dpp_status_error status) {
wpa_printf(MSG_DEBUG, "DPP: Status %d", status);
wpabuf_put_le16(msg, DPP_ATTR_STATUS);
wpabuf_put_le16(msg, 1);
wpabuf_put_u8(msg, status);
} | dpp_build_attr_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_obj(dpp_authentication *auth, dpp_netrole netrole,
int idx, bool cert_req) {
const char *v4;
dpp_configuration *conf;
conf = 0;
if (idx) {
if (idx == 1) {
if (netrole) {
if (netrole == dpp_netrole_DPP_NETROLE_AP)
conf = auth->conf2_a... | static struct wpabuf *dpp_build_conf_obj(struct dpp_authentication *auth,
enum dpp_netrole netrole, int idx,
bool cert_req) {
struct dpp_configuration *conf = NULL;
#ifdef CONFIG_TESTING_OPTIONS
if (auth->config_obj_override) {
i... | dpp_build_conf_obj | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_obj_dpp(dpp_authentication *auth,
dpp_configuration *conf) {
char *group_id;
const char *v3;
const char *v4;
_BOOL4 v5;
unsigned long v6;
size_t v7;
const void *v8;
size_t v9;
const void *v10;
size_t v11;
const void *v12;
dpp_akm akm;
int i... | static struct wpabuf *dpp_build_conf_obj_dpp(struct dpp_authentication *auth,
struct dpp_configuration *conf) {
struct wpabuf *buf = NULL;
char *signed_conn = NULL;
size_t tailroom;
const struct dpp_curve_params *curve;
struct wpabuf *dppcon = NULL;
size_t extra_... | dpp_build_conf_obj_dpp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_obj_legacy(dpp_authentication *auth,
dpp_configuration *conf) {
size_t v3;
const void *v4;
const char *akm_str;
wpabuf *buf;
buf = dpp_build_conf_start(auth, conf, 0x3E8u);
if (!buf)
return 0;
if (auth->akm_use_selector && dpp_akm_ver2(conf->ak... | static struct wpabuf *
dpp_build_conf_obj_legacy(struct dpp_authentication *auth,
struct dpp_configuration *conf) {
struct wpabuf *buf;
const char *akm_str;
buf = dpp_build_conf_start(auth, conf, 1000);
if (!buf)
return NULL;
if (auth->akm_use_selector && dpp_akm_ver2(conf->akm... | dpp_build_conf_obj_legacy | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_req(dpp_authentication *auth, const char *json) {
size_t v3;
wpabuf *conf_req;
wpabuf *buf;
conf_req = dpp_build_conf_req_attr(auth, json);
if (conf_req) {
v3 = wpabuf_len_53(conf_req);
buf = gas_build_initial_req(0, v3 + 12);
if (buf) {
dpp_write_adv_proto(buf);
... | struct wpabuf *dpp_build_conf_req(struct dpp_authentication *auth,
const char *json) {
struct wpabuf *buf, *conf_req;
conf_req = dpp_build_conf_req_attr(auth, json);
if (!conf_req) {
wpa_printf(MSG_DEBUG, "DPP: No configuration request data available");
return NULL;
}
... | dpp_build_conf_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_req_attr(dpp_authentication *auth, const char *json) {
u16 v2;
size_t v3;
size_t v4;
const u8 *v5;
size_t v6;
wpabuf *clear;
wpabuf *msg;
size_t nonce_len;
size_t json_len;
u8 *wrapped;
clear = 0;
msg = 0;
wpa_printf(2, "DPP: Build configuration request");
nonce_len =... | static struct wpabuf *dpp_build_conf_req_attr(struct dpp_authentication *auth,
const char *json) {
size_t nonce_len;
size_t json_len, clear_len;
struct wpabuf *clear = NULL, *msg = NULL;
u8 *wrapped;
size_t attr_len;
wpa_printf(MSG_DEBUG, "DPP: Build configurat... | dpp_build_conf_req_attr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_req_helper(dpp_authentication *auth, const char *name,
dpp_netrole netrole, const char *mud_url,
int *opclasses) {
const char *v5;
const char *v7;
const char *v8;
const char *v9;
int i;
size_t len;
const char *dpp_n... | struct wpabuf *dpp_build_conf_req_helper(struct dpp_authentication *auth,
const char *name,
enum dpp_netrole netrole,
const char *mud_url, int *opclasses) {
size_t len, name_len;
const char *te... | dpp_build_conf_req_helper | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_resp(dpp_authentication *auth, const u8 *e_nonce,
u16 e_nonce_len, dpp_netrole netrole,
bool cert_req) {
size_t v5;
const void *v6;
u16 v7;
u16 v8;
u16 v9;
u16 v10;
size_t v11;
size_t v12;
const u8 *v13;
size_t v14;
dpp... | struct wpabuf *dpp_build_conf_resp(struct dpp_authentication *auth,
const u8 *e_nonce, u16 e_nonce_len,
enum dpp_netrole netrole, bool cert_req) {
struct wpabuf *conf = NULL, *conf2 = NULL, *env_data = NULL;
size_t clear_len, attr_len;
struct w... | dpp_build_conf_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_build_conf_start(dpp_authentication *auth, dpp_configuration *conf,
size_t tailroom) {
wpabuf *buf;
buf = wpabuf_alloc(tailroom + 200);
if (!buf)
return 0;
json_start_object(buf, 0);
json_add_string(buf, "wi-fi_tech", "infra");
json_value_sep(buf);
json_start_... | static struct wpabuf *dpp_build_conf_start(struct dpp_authentication *auth,
struct dpp_configuration *conf,
size_t tailroom) {
struct wpabuf *buf;
#ifdef CONFIG_TESTING_OPTIONS
if (auth->discovery_override)
tailroom += os_str... | dpp_build_conf_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *dpp_build_conn_signature(dpp_configurator *conf, const char *signed1,
size_t signed1_len, const char *signed2,
size_t signed2_len, size_t *signed3_len) {
size_t v6;
const void *v7;
size_t v8;
const void *v9;
int ret;
wpabuf *sig;
char *si... | static char *dpp_build_conn_signature(struct dpp_configurator *conf,
const char *signed1, size_t signed1_len,
const char *signed2, size_t signed2_len,
size_t *signed3_len) {
const struct dpp_curve_params ... | dpp_build_conn_signature | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_build_jwk(wpabuf *buf, const char *name, crypto_ec_key *key,
const char *kid, const dpp_curve_params *curve) {
int ret;
wpabuf *pub;
const u8 *pos;
ret = -1;
pub = crypto_ec_key_get_pubkey_point(key, 0);
if (pub) {
json_start_object(buf, name);
json_add_string(buf, "kty", ... | int dpp_build_jwk(struct wpabuf *buf, const char *name,
struct crypto_ec_key *key, const char *kid,
const struct dpp_curve_params *curve) {
struct wpabuf *pub;
const u8 *pos;
int ret = -1;
pub = crypto_ec_key_get_pubkey_point(key, 0);
if (!pub)
goto fail;
json_start... | dpp_build_jwk | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *dpp_build_jws_prot_hdr(dpp_configurator *conf, size_t *signed1_len) {
size_t v3;
const void *v4;
wpabuf *jws_prot_hdr;
char *signed1;
jws_prot_hdr = wpabuf_alloc(0x64u);
if (!jws_prot_hdr)
return 0;
json_start_object(jws_prot_hdr, 0);
json_add_string(jws_prot_hdr, "typ", "dppCon");
json_val... | static char *dpp_build_jws_prot_hdr(struct dpp_configurator *conf,
size_t *signed1_len) {
struct wpabuf *jws_prot_hdr;
char *signed1;
jws_prot_hdr = wpabuf_alloc(100);
if (!jws_prot_hdr)
return NULL;
json_start_object(jws_prot_hdr, NULL);
json_add_string(jws_prot_hdr... | dpp_build_jws_prot_hdr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_build_legacy_cred_params(wpabuf *buf, dpp_configuration *conf) {
size_t v2;
char psk[72];
unsigned long v4;
v4 = __readfsqword(0x28u);
if (conf->passphrase && strlen(conf->passphrase) <= 0x3F) {
v2 = strlen(conf->passphrase);
json_add_string_escape(buf, "pass", conf->passphrase, v2);
} els... | static void dpp_build_legacy_cred_params(struct wpabuf *buf,
struct dpp_configuration *conf) {
if (conf->passphrase && os_strlen(conf->passphrase) < 64) {
json_add_string_escape(buf, "pass", conf->passphrase,
os_strlen(conf->passphrase));
} els... | dpp_build_legacy_cred_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_channel_intersect(dpp_authentication *auth, hostapd_hw_modes *own_modes,
u16 num_modes) {
unsigned int num_freq;
unsigned int i;
unsigned int freq;
dpp_bootstrap_info *peer_bi;
peer_bi = auth->peer_bi;
for (i = 0; i < peer_bi->num_freq; ++i) {
freq = peer_bi->freq[i];
... | static int dpp_channel_intersect(struct dpp_authentication *auth,
struct hostapd_hw_modes *own_modes,
u16 num_modes) {
struct dpp_bootstrap_info *peer_bi = auth->peer_bi;
unsigned int i, freq;
for (i = 0; i < peer_bi->num_freq; i++) {
freq = p... | dpp_channel_intersect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_channel_local_list(dpp_authentication *auth,
hostapd_hw_modes *own_modes, u16 num_modes) {
unsigned int num_freq;
u16 m;
int c;
int freq;
auth->num_freq = 0;
if (own_modes && num_modes) {
for (m = 0; m < num_modes; ++m) {
for (c = 0; c < own_modes[m].num_channel... | static int dpp_channel_local_list(struct dpp_authentication *auth,
struct hostapd_hw_modes *own_modes,
u16 num_modes) {
u16 m;
int c, flag;
unsigned int freq;
auth->num_freq = 0;
if (!own_modes || !num_modes) {
auth->freq[0] = 2412;
... | dpp_channel_local_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_channel_ok_init(hostapd_hw_modes *own_modes, u16 num_modes,
unsigned int freq) {
u16 m;
int c;
if (!own_modes || !num_modes)
return 1;
for (m = 0; m < num_modes; ++m) {
for (c = 0; c < own_modes[m].num_channels; ++c) {
if (freq == own_modes[m].channels[c].freq &&
... | static int dpp_channel_ok_init(struct hostapd_hw_modes *own_modes,
u16 num_modes, unsigned int freq) {
u16 m;
int c, flag;
if (!own_modes || !num_modes)
return 1;
for (m = 0; m < num_modes; m++) {
for (c = 0; c < own_modes[m].num_channels; c++) {
if ((unsigned int)... | dpp_channel_ok_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_check_attrs(const u8 *buf, size_t len) {
u16 id;
u16 alen;
_BOOL4 wrapped_data;
const u8 *pos;
const u8 *posb;
const u8 *posa;
const u8 *end;
wrapped_data = 0;
pos = buf;
end = &buf[len];
while (end - pos > 3) {
id = WPA_GET_LE16_7(pos);
posb = pos + 2;
alen = WPA_GET_LE16_7(p... | int dpp_check_attrs(const u8 *buf, size_t len) {
const u8 *pos, *end;
int wrapped_data = 0;
pos = buf;
end = buf + len;
while (end - pos >= 4) {
u16 id, alen;
id = WPA_GET_LE16(pos);
pos += 2;
alen = WPA_GET_LE16(pos);
pos += 2;
wpa_printf(MSG_MSGDUMP, "DPP: Attribute ID %04x len %u"... | dpp_check_attrs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_check_pubkey_match(crypto_ec_key *pub, wpabuf *r_hash) {
const void *v3;
int res;
wpabuf *uncomp;
const u8 *addr[1];
size_t len[1];
u8 hash[40];
unsigned long v9;
v9 = __readfsqword(0x28u);
if (wpabuf_len_55(r_hash) != 32)
return -1;
uncomp = crypto_ec_key_get_pubkey_point(pub, 1);
if... | static int dpp_check_pubkey_match(struct crypto_ec_key *pub,
struct wpabuf *r_hash) {
struct wpabuf *uncomp;
int res;
u8 hash[SHA256_MAC_LEN];
const u8 *addr[1];
size_t len[1];
if (wpabuf_len(r_hash) != SHA256_MAC_LEN)
return -1;
uncomp = crypto_ec_key_get_pubkey_poi... | dpp_check_pubkey_match | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_status_error dpp_check_signed_connector(dpp_signed_connector_info *info,
const u8 *csign_key,
size_t csign_key_len,
const u8 *peer_connector,
... | enum dpp_status_error dpp_check_signed_connector(
struct dpp_signed_connector_info *info, const u8 *csign_key,
size_t csign_key_len, const u8 *peer_connector, size_t peer_connector_len) {
struct crypto_ec_key *csign;
char *signed_connector = NULL;
enum dpp_status_error res = DPP_STATUS_INVALID_CONNECTOR;
... | dpp_check_signed_connector | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_clone_uri(dpp_bootstrap_info *bi, const char *uri) {
bi->uri = strdup(uri);
if (bi->uri)
return 0;
else
return -1;
} | static int dpp_clone_uri(struct dpp_bootstrap_info *bi, const char *uri) {
bi->uri = os_strdup(uri);
return bi->uri ? 0 : -1;
} | dpp_clone_uri | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_compatible_netrole(const char *role1, const char *role2) {
return !strcmp(role1, "sta") && !strcmp(role2, "ap") ||
!strcmp(role1, "ap") && !strcmp(role2, "sta");
} | static int dpp_compatible_netrole(const char *role1, const char *role2) {
return (os_strcmp(role1, "sta") == 0 && os_strcmp(role2, "ap") == 0) ||
(os_strcmp(role1, "ap") == 0 && os_strcmp(role2, "sta") == 0);
} | dpp_compatible_netrole | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dpp_conf_req_rx(dpp_authentication *auth, const u8 *attr_start,
size_t attr_len) {
const char *v4;
u16 wrapped_data_len;
u16 e_nonce_len;
u16 config_attr_len;
dpp_netrole netrole;
int i;
int res;
int *opclass;
wpabuf *resp;
json_token *root;
json_token *token;
cha... | struct wpabuf *dpp_conf_req_rx(struct dpp_authentication *auth,
const u8 *attr_start, size_t attr_len) {
const u8 *wrapped_data, *e_nonce, *config_attr;
u16 wrapped_data_len, e_nonce_len, config_attr_len;
u8 *unwrapped = NULL;
size_t unwrapped_len = 0;
struct wpabuf *resp = NULL... | dpp_conf_req_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_conf_resp_rx(dpp_authentication *auth, const wpabuf *resp) {
size_t v2;
const u8 *v3;
size_t v5;
const u8 *v6;
const u8 *v7;
size_t v8;
const u8 *v9;
u16 wrapped_data_len;
u16 e_nonce_len;
u16 status_len;
u16 conf_obj_len;
u16 env_data_len;
int ret;
const u8 *conf_obj;
u8 *unwrappe... | int dpp_conf_resp_rx(struct dpp_authentication *auth,
const struct wpabuf *resp) {
const u8 *wrapped_data, *e_nonce, *status, *conf_obj;
u16 wrapped_data_len, e_nonce_len, status_len, conf_obj_len;
const u8 *env_data;
u16 env_data_len;
const u8 *addr[1];
size_t len[1];
u8 *unwrapped =... | dpp_conf_resp_rx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_configuration *dpp_configuration_alloc(const char *type) {
size_t len;
dpp_configuration *conf;
char *end;
conf = (dpp_configuration *)os_zalloc(0x80u);
if (conf) {
end = strchr(type, 32);
if (end)
len = end - type;
else
len = strlen(type);
if (bin_str_eq(type, len, "psk")) {
... | struct dpp_configuration *dpp_configuration_alloc(const char *type) {
struct dpp_configuration *conf;
const char *end;
size_t len;
conf = os_zalloc(sizeof(*conf));
if (!conf)
goto fail;
end = os_strchr(type, ' ');
if (end)
len = end - type;
else
len = os_strlen(type);
if (bin_str_eq(typ... | dpp_configuration_alloc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_configuration_free(dpp_configuration *conf) {
if (conf) {
str_clear_free(conf->passphrase);
free(conf->group_id);
free(conf->csrattrs);
bin_clear_free(conf, 0x80u);
}
} | void dpp_configuration_free(struct dpp_configuration *conf) {
if (!conf)
return;
str_clear_free(conf->passphrase);
os_free(conf->group_id);
os_free(conf->csrattrs);
bin_clear_free(conf, sizeof(*conf));
} | dpp_configuration_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configuration_parse(dpp_authentication *auth, const char *cmd) {
int res;
char *pos;
size_t len;
char *tmp;
pos = strstr(cmd, " @CONF-OBJ-SEP@ ");
if (!pos)
return dpp_configuration_parse_helper(auth, cmd, 0);
len = pos - cmd;
tmp = (char *)malloc(pos - cmd + 1);
if (tmp) {
memcpy(tmp... | static int dpp_configuration_parse(struct dpp_authentication *auth,
const char *cmd) {
const char *pos;
char *tmp;
size_t len;
int res;
pos = os_strstr(cmd, " @CONF-OBJ-SEP@ ");
if (!pos)
return dpp_configuration_parse_helper(auth, cmd, 0);
len = pos - cmd;
tmp =... | dpp_configuration_parse | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configuration_parse_helper(dpp_authentication *auth, const char *cmd,
int idx) {
size_t v4;
size_t v5;
size_t v6;
size_t v7;
dpp_configuration *conf_sta;
dpp_configuration *conf_ap;
dpp_configuration *conf;
char *pos;
char *posa;
char *posb;
const char *p... | static int dpp_configuration_parse_helper(struct dpp_authentication *auth,
const char *cmd, int idx) {
const char *pos, *end;
struct dpp_configuration *conf_sta = NULL, *conf_ap = NULL;
struct dpp_configuration *conf = NULL;
size_t len;
pos = os_strstr(cmd, " conf=st... | dpp_configuration_parse_helper | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configuration_valid(const dpp_configuration *conf) {
if (!conf->ssid_len)
return 0;
if (dpp_akm_psk(conf->akm) && !conf->passphrase && !conf->psk_set)
return 0;
return !dpp_akm_sae(conf->akm) || conf->passphrase;
} | int dpp_configuration_valid(const struct dpp_configuration *conf) {
if (conf->ssid_len == 0)
return 0;
if (dpp_akm_psk(conf->akm) && !conf->passphrase && !conf->psk_set)
return 0;
if (dpp_akm_sae(conf->akm) && !conf->passphrase)
return 0;
return 1;
} | dpp_configuration_valid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_add(dpp_global *dpp, const char *cmd) {
int ret;
u8 *privkey;
u8 *pp_key;
size_t privkey_len;
size_t pp_key_len;
dpp_configurator *conf;
char *curve;
char *key;
char *ppkey;
privkey = 0;
pp_key = 0;
privkey_len = 0;
pp_key_len = 0;
ret = -1;
curve = get_param(cmd, " c... | int dpp_configurator_add(struct dpp_global *dpp, const char *cmd) {
char *curve = NULL;
char *key = NULL, *ppkey = NULL;
u8 *privkey = NULL, *pp_key = NULL;
size_t privkey_len = 0, pp_key_len = 0;
int ret = -1;
struct dpp_configurator *conf = NULL;
curve = get_param(cmd, " curve=");
key = get_param(cmd... | dpp_configurator_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_del(dpp_global *dpp, unsigned int id) {
int found;
dpp_configurator *conf;
dpp_configurator *tmp;
found = 0;
if (!dpp)
return -1;
conf = (dpp_configurator *)dpp->configurator.next;
tmp = (dpp_configurator *)conf->list.next;
while (conf != (dpp_configurator *)&dpp->configurator)... | static int dpp_configurator_del(struct dpp_global *dpp, unsigned int id) {
struct dpp_configurator *conf, *tmp;
int found = 0;
if (!dpp)
return -1;
dl_list_for_each_safe(conf, tmp, &dpp->configurator, struct dpp_configurator,
list) {
if (id && conf->id != id)
continue;
... | dpp_configurator_del | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_configurator_free(dpp_configurator *conf) {
if (conf) {
crypto_ec_key_deinit(conf->csign);
free(conf->kid);
free(conf->connector);
crypto_ec_key_deinit(conf->connector_key);
crypto_ec_key_deinit(conf->pp_key);
free(conf);
}
} | void dpp_configurator_free(struct dpp_configurator *conf) {
if (!conf)
return;
crypto_ec_key_deinit(conf->csign);
os_free(conf->kid);
os_free(conf->connector);
crypto_ec_key_deinit(conf->connector_key);
crypto_ec_key_deinit(conf->pp_key);
os_free(conf);
} | dpp_configurator_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_gen_kid(dpp_configurator *conf) {
int res;
wpabuf *csign_pub;
const u8 *addr[1];
size_t len[1];
unsigned long v6;
v6 = __readfsqword(0x28u);
csign_pub = crypto_ec_key_get_pubkey_point(conf->csign, 1);
if (csign_pub) {
addr[0] = (const u8 *)wpabuf_head_53(csign_pub);
len[0] ... | static int dpp_configurator_gen_kid(struct dpp_configurator *conf) {
struct wpabuf *csign_pub = NULL;
const u8 *addr[1];
size_t len[1];
int res;
csign_pub = crypto_ec_key_get_pubkey_point(conf->csign, 1);
if (!csign_pub) {
wpa_printf(MSG_INFO, "DPP: Failed to extract C-sign-key");
return -1;
}
... | dpp_configurator_gen_kid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
dpp_configurator *dpp_configurator_get_id(dpp_global *dpp, unsigned int id) {
dpp_configurator *conf;
if (!dpp)
return 0;
for (conf = (dpp_configurator *)dpp->configurator.next;
conf != (dpp_configurator *)&dpp->configurator;
conf = (dpp_configurator *)conf->list.next) {
if (id == conf->id)... | static struct dpp_configurator *dpp_configurator_get_id(struct dpp_global *dpp,
unsigned int id) {
struct dpp_configurator *conf;
if (!dpp)
return NULL;
dl_list_for_each(conf, &dpp->configurator, struct dpp_configurator, list) {
if (conf->id == id)... | dpp_configurator_get_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_get_key(const dpp_configurator *conf, char *buf,
size_t buflen) {
size_t v4;
const u8 *v5;
int ret;
wpabuf *key;
if (!conf->csign)
return -1;
key = crypto_ec_key_get_ecprivate_key(conf->csign, 1);
if (!key)
return -1;
v4 = wpabuf_len_53(key);
... | int dpp_configurator_get_key(const struct dpp_configurator *conf, char *buf,
size_t buflen) {
struct wpabuf *key;
int ret = -1;
if (!conf->csign)
return -1;
key = crypto_ec_key_get_ecprivate_key(conf->csign, true);
if (!key)
return -1;
ret = wpa_snprintf_hex(buf, bufl... | dpp_configurator_get_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_get_key_id(dpp_global *dpp, unsigned int id, char *buf,
size_t buflen) {
const dpp_configurator *conf;
conf = dpp_configurator_get_id(dpp, id);
if (conf)
return dpp_configurator_get_key(conf, buf, buflen);
else
return -1;
} | int dpp_configurator_get_key_id(struct dpp_global *dpp, unsigned int id,
char *buf, size_t buflen) {
struct dpp_configurator *conf;
conf = dpp_configurator_get_id(dpp, id);
if (!conf)
return -1;
return dpp_configurator_get_key(conf, buf, buflen);
} | dpp_configurator_get_key_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_own_config(dpp_authentication *auth, const char *curve,
int ap) {
u16 v4;
const u8 *v5;
int ret;
wpabuf *conf_obj;
ret = -1;
if (auth->conf) {
auth->curve = dpp_get_curve_name(curve);
if (auth->curve) {
wpa_printf(2, "DPP: Building own conf... | int dpp_configurator_own_config(struct dpp_authentication *auth,
const char *curve, int ap) {
struct wpabuf *conf_obj;
int ret = -1;
if (!auth->conf) {
wpa_printf(MSG_DEBUG, "DPP: No configurator specified");
return -1;
}
auth->curve = dpp_get_curve_name(curve);
if ... | dpp_configurator_own_config | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_configurator_remove(dpp_global *dpp, const char *id) {
int id_val;
if (!strcmp(id, "*")) {
id_val = 0;
} else {
id_val = atoi(id);
if (!id_val)
return -1;
}
return dpp_configurator_del(dpp, id_val);
} | int dpp_configurator_remove(struct dpp_global *dpp, const char *id) {
unsigned int id_val;
if (os_strcmp(id, "*") == 0) {
id_val = 0;
} else {
id_val = atoi(id);
if (id_val == 0)
return -1;
}
return dpp_configurator_del(dpp, id_val);
} | dpp_configurator_remove | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_connector_compatible_group(json_token *root, const char *group_id,
const char *net_role, bool reconfig) {
json_token *token;
json_token *groups;
json_token *id;
json_token *role;
groups = json_get_member(root, "groups");
if (!groups || groups->type != json_type_JS... | static int dpp_connector_compatible_group(struct json_token *root,
const char *group_id,
const char *net_role, bool reconfig) {
struct json_token *groups, *token;
groups = json_get_member(root, "groups");
if (!groups || groups->t... | dpp_connector_compatible_group | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_connector_match_groups(json_token *own_root, json_token *peer_root,
bool reconfig) {
json_token *token;
json_token *groups;
json_token *id;
json_token *role;
groups = json_get_member(peer_root, "groups");
if (groups && groups->type == json_type_JSON_ARRAY) {
for (... | int dpp_connector_match_groups(struct json_token *own_root,
struct json_token *peer_root, bool reconfig) {
struct json_token *groups, *token;
groups = json_get_member(peer_root, "groups");
if (!groups || groups->type != JSON_ARRAY) {
wpa_printf(MSG_DEBUG, "DPP: No peer groups a... | dpp_connector_match_groups | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_copy_csign(dpp_config_obj *conf, crypto_ec_key *csign) {
wpabuf *c_sign_key;
c_sign_key = crypto_ec_key_get_subject_public_key(csign);
if (c_sign_key) {
wpabuf_free(conf->c_sign_key);
conf->c_sign_key = c_sign_key;
}
} | static void dpp_copy_csign(struct dpp_config_obj *conf,
struct crypto_ec_key *csign) {
struct wpabuf *c_sign_key;
c_sign_key = crypto_ec_key_get_subject_public_key(csign);
if (!c_sign_key)
return;
wpabuf_free(conf->c_sign_key);
conf->c_sign_key = c_sign_key;
} | dpp_copy_csign | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_copy_netaccesskey(dpp_authentication *auth, dpp_config_obj *conf) {
wpabuf *net_access_key;
net_access_key = crypto_ec_key_get_ecprivate_key(auth->own_protocol_key, 1);
if (net_access_key) {
wpabuf_free(auth->net_access_key);
auth->net_access_key = net_access_key;
}
} | static void dpp_copy_netaccesskey(struct dpp_authentication *auth,
struct dpp_config_obj *conf) {
struct wpabuf *net_access_key;
struct crypto_ec_key *own_key;
own_key = auth->own_protocol_key;
#ifdef CONFIG_DPP2
if (auth->reconfig_connector_key == DPP_CONFIG_REUSEKEY &&
... | dpp_copy_netaccesskey | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_copy_ppkey(dpp_config_obj *conf, crypto_ec_key *ppkey) {
wpabuf *pp_key;
pp_key = crypto_ec_key_get_subject_public_key(ppkey);
if (pp_key) {
wpabuf_free(conf->pp_key);
conf->pp_key = pp_key;
}
} | static void dpp_copy_ppkey(struct dpp_config_obj *conf,
struct crypto_ec_key *ppkey) {
struct wpabuf *pp_key;
pp_key = crypto_ec_key_get_subject_public_key(ppkey);
if (!pp_key)
return;
wpabuf_free(conf->pp_key);
conf->pp_key = pp_key;
} | dpp_copy_ppkey | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dpp_debug_print_key(const char *title, crypto_ec_key *key) {
wpabuf *der;
crypto_ec_key_debug_print(key, title);
der = crypto_ec_key_get_ecprivate_key(key, 1);
if (der) {
wpa_hexdump_buf_key_4(2, "DPP: ECPrivateKey", der);
} else {
der = crypto_ec_key_get_subject_public_key(key);
if (der)
... | void dpp_debug_print_key(const char *title, struct crypto_ec_key *key) {
struct wpabuf *der = NULL;
crypto_ec_key_debug_print(key, title);
der = crypto_ec_key_get_ecprivate_key(key, true);
if (der) {
wpa_hexdump_buf_key(MSG_DEBUG, "DPP: ECPrivateKey", der);
} else {
der = crypto_ec_key_get_subject_p... | dpp_debug_print_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_derive_bk_ke(dpp_authentication *auth) {
unsigned int hash_len;
size_t num_elem;
size_t nonce_len;
const u8 *addr[3];
size_t len[4];
u8 nonces[72];
unsigned long v8;
v8 = __readfsqword(0x28u);
hash_len = auth->curve->hash_len;
nonce_len = auth->curve->nonce_len;
if (!auth->Mx_len || !auth... | int dpp_derive_bk_ke(struct dpp_authentication *auth) {
unsigned int hash_len = auth->curve->hash_len;
size_t nonce_len = auth->curve->nonce_len;
u8 nonces[2 * DPP_MAX_NONCE_LEN];
const char *info_ke = "DPP Key";
int res;
const u8 *addr[3];
size_t len[3];
size_t num_elem = 0;
if (!auth->Mx_len || !au... | dpp_derive_bk_ke | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_derive_k1(const u8 *Mx, size_t Mx_len, u8 *k1_0,
unsigned int hash_len) {
int res;
u8 salt[64];
u8 prk[72];
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(salt, 0, hash_len);
if (dpp_hmac(hash_len, salt, hash_len, Mx, Mx_len, prk) < 0)
return -1;
wpa_hexdump_key(2, ... | int dpp_derive_k1(const u8 *Mx, size_t Mx_len, u8 *k1, unsigned int hash_len) {
u8 salt[DPP_MAX_HASH_LEN], prk[DPP_MAX_HASH_LEN];
const char *info = "first intermediate key";
int res;
os_memset(salt, 0, hash_len);
if (dpp_hmac(hash_len, salt, hash_len, Mx, Mx_len, prk) < 0)
return -1;
wpa_hexdump_key(M... | dpp_derive_k1 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_derive_k2(const u8 *Nx, size_t Nx_len, u8 *k2_0,
unsigned int hash_len) {
int res;
u8 salt[64];
u8 prk[72];
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(salt, 0, hash_len);
if (dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk) < 0)
return -1;
wpa_hexdump_key(2, ... | int dpp_derive_k2(const u8 *Nx, size_t Nx_len, u8 *k2, unsigned int hash_len) {
u8 salt[DPP_MAX_HASH_LEN], prk[DPP_MAX_HASH_LEN];
const char *info = "second intermediate key";
int res;
os_memset(salt, 0, hash_len);
res = dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk);
if (res < 0)
return -1;
wpa... | dpp_derive_k2 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_derive_pmk(const u8 *Nx, size_t Nx_len, u8 *pmk,
unsigned int hash_len) {
int res;
u8 salt[64];
u8 prk[72];
unsigned long v10;
v10 = __readfsqword(0x28u);
memset(salt, 0, hash_len);
if (dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk) < 0)
return -1;
wpa_hexdump_key(2,... | int dpp_derive_pmk(const u8 *Nx, size_t Nx_len, u8 *pmk,
unsigned int hash_len) {
u8 salt[DPP_MAX_HASH_LEN], prk[DPP_MAX_HASH_LEN];
const char *info = "DPP PMK";
int res;
os_memset(salt, 0, hash_len);
if (dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk) < 0)
return -1;
wpa_hexdump... | dpp_derive_pmk | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_derive_pmkid(const dpp_curve_params *curve, crypto_ec_key *own_key,
crypto_ec_key *peer_key, u8 *pmkid) {
long v4;
int ret;
wpabuf *nkx;
wpabuf *pkx;
const u8 *addr[2];
size_t len[2];
u8 hash[32];
unsigned long v14;
v14 = __readfsqword(0x28u);
ret = -1;
nkx = crypto_e... | int dpp_derive_pmkid(const struct dpp_curve_params *curve,
struct crypto_ec_key *own_key,
struct crypto_ec_key *peer_key, u8 *pmkid) {
struct wpabuf *nkx, *pkx;
int ret = -1, res;
const u8 *addr[2];
size_t len[2];
u8 hash[SHA256_MAC_LEN];
nkx = crypto_ec_key_get_pu... | dpp_derive_pmkid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dpp_ecdh(crypto_ec_key *own, crypto_ec_key *peer, u8 *secret,
size_t *secret_len) {
int v4;
size_t v6;
const u8 *v7;
size_t v8;
const void *v9;
int ret;
wpabuf *secret_buf;
crypto_ecdh *ecdh;
wpabuf *peer_pub;
secret_buf = 0;
ret = -1;
*secret_len = 0;
v4 = crypto_ec_key_grou... | int dpp_ecdh(struct crypto_ec_key *own, struct crypto_ec_key *peer, u8 *secret,
size_t *secret_len) {
struct crypto_ecdh *ecdh;
struct wpabuf *peer_pub, *secret_buf = NULL;
int ret = -1;
*secret_len = 0;
ecdh = crypto_ecdh_init2(crypto_ec_key_group(own), own);
if (!ecdh) {
wpa_printf(MSG_... | dpp_ecdh | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | 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 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_ec_key *dpp_gen_keypair(const dpp_curve_params *curve) {
crypto_ec_key *key;
wpa_printf(2, "DPP: Generating a keypair");
key = crypto_ec_key_gen(curve->ike_group);
if (key && wpa_debug_show_keys)
dpp_debug_print_key("Own generated key", key);
return key;
} | struct crypto_ec_key *dpp_gen_keypair(const struct dpp_curve_params *curve) {
struct crypto_ec_key *key;
wpa_printf(MSG_DEBUG, "DPP: Generating a keypair");
key = crypto_ec_key_gen(curve->ike_group);
if (key && wpa_debug_show_keys)
dpp_debug_print_key("Own generated key", key);
return key;
} | dpp_gen_keypair | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.