input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
void disable_wpa_wpa2(wpa_ssid *ssid) {
ssid->proto &= ~1u;
ssid->proto |= 2u;
ssid->key_mgmt &= 0xFFFFFEBD;
ssid->group_cipher &= ~8u;
if ((ssid->group_cipher & 0x350) == 0)
ssid->group_cipher |= 0x10u;
ssid->ieee80211w = mfp_options_MGMT_FRAME_PROTECTION_REQUIRED;
} | static void disable_wpa_wpa2(struct wpa_ssid *ssid) {
ssid->proto &= ~WPA_PROTO_WPA;
ssid->proto |= WPA_PROTO_RSN;
ssid->key_mgmt &=
~(WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK | WPA_KEY_MGMT_PSK_SHA256);
ssid->group_cipher &= ~WPA_CIPHER_TKIP;
if (!(ssid->group_cipher & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP ... | disable_wpa_wpa2 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int disabled_freq(wpa_supplicant_0 *wpa_s, int freq) {
int i;
int j;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
if (!wpa_s->hw.modes || !wpa_s->hw.num_modes)
return 0;
for (j = 0; j < wpa_s->hw.num_modes; ++j) {
mode = &wpa_s->hw.modes[j];
for (i = 0; i < mode->num_channels; ++i) {
... | static int disabled_freq(struct wpa_supplicant *wpa_s, int freq) {
int i, j;
if (!wpa_s->hw.modes || !wpa_s->hw.num_modes)
return 0;
for (j = 0; j < wpa_s->hw.num_modes; j++) {
struct hostapd_hw_modes *mode = &wpa_s->hw.modes[j];
for (i = 0; i < mode->num_channels; i++) {
struct hostapd_chann... | disabled_freq | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int disallowed_bssid(wpa_supplicant *wpa_s, const u8 *bssid) {
size_t i;
if (!wpa_s->disallow_aps_bssid)
return 0;
for (i = 0; i < wpa_s->disallow_aps_bssid_count; ++i) {
if (!memcmp(&wpa_s->disallow_aps_bssid[6 * i], bssid, 6u))
return 1;
}
return 0;
} | int disallowed_bssid(struct wpa_supplicant *wpa_s, const u8 *bssid) {
size_t i;
if (wpa_s->disallow_aps_bssid == NULL)
return 0;
for (i = 0; i < wpa_s->disallow_aps_bssid_count; i++) {
if (os_memcmp(wpa_s->disallow_aps_bssid + i * ETH_ALEN, bssid, ETH_ALEN) ==
0)
return 1;
}
return 0;... | disallowed_bssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int disallowed_ssid(wpa_supplicant *wpa_s, const u8 *ssid, size_t ssid_len) {
size_t i;
wpa_ssid_value *s;
if (!wpa_s->disallow_aps_ssid || !ssid)
return 0;
for (i = 0; i < wpa_s->disallow_aps_ssid_count; ++i) {
s = &wpa_s->disallow_aps_ssid[i];
if (ssid_len == s->ssid_len && !memcmp(ssid, s, ssid_... | int disallowed_ssid(struct wpa_supplicant *wpa_s, const u8 *ssid,
size_t ssid_len) {
size_t i;
if (wpa_s->disallow_aps_ssid == NULL || ssid == NULL)
return 0;
for (i = 0; i < wpa_s->disallow_aps_ssid_count; i++) {
struct wpa_ssid_value *s = &wpa_s->disallow_aps_ssid[i];
if (ssid_... | disallowed_ssid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
DBusHandlerResult disconnect_filter(DBusConnection *conn, DBusMessage *message,
void *data) {
if (!(unsigned int)dbus_message_is_signal(
message, "org.freedesktop.DBus.Local", "Disconnected"))
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
wpa_printf(2, "dbus: bus disc... | static DBusHandlerResult disconnect_filter(DBusConnection *conn,
DBusMessage *message, void *data) {
struct wpas_dbus_priv *priv = data;
if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
wpa_printf(MSG_DEBUG, "dbus: bus disconnected, termina... | disconnect_filter | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int disconnect_reason_recoverable(u16 reason_code) {
return reason_code == 4 || reason_code == 6 || reason_code == 7;
} | static int disconnect_reason_recoverable(u16 reason_code) {
return reason_code == WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY ||
reason_code == WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA ||
reason_code == WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA;
} | disconnect_reason_recoverable | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dispatch_data(DBusConnection *con) {
while (!(unsigned int)dbus_connection_get_dispatch_status(con))
dbus_connection_dispatch(con);
} | static void dispatch_data(DBusConnection *con) {
while (dbus_connection_get_dispatch_status(con) == DBUS_DISPATCH_DATA_REMAINS)
dbus_connection_dispatch(con);
} | dispatch_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dispatch_initial_dbus_messages(void *eloop_ctx, void *timeout_ctx) {
dispatch_data((DBusConnection *)eloop_ctx);
} | static void dispatch_initial_dbus_messages(void *eloop_ctx, void *timeout_ctx) {
DBusConnection *con = eloop_ctx;
dispatch_data(con);
} | dispatch_initial_dbus_messages | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void do_send_deprecated_prop_changed_signal(
DBusConnection *con, const char *path, const char *interface,
const wpa_dbus_object_desc *obj_dsc) {
DBusMessage *msg;
DBusMessageIter signal_iter;
DBusMessageIter dict_iter;
unsigned long v9;
v9 = __readfsqword(0x28u);
msg = (DBusMessage *)dbus_message_... | static void do_send_deprecated_prop_changed_signal(
DBusConnection *con, const char *path, const char *interface,
const struct wpa_dbus_object_desc *obj_dsc) {
DBusMessage *msg;
DBusMessageIter signal_iter, dict_iter;
msg = dbus_message_new_signal(path, interface, "PropertiesChanged");
if (msg == NULL)... | do_send_deprecated_prop_changed_signal | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void do_send_prop_changed_signal(DBusConnection *con, const char *path,
const char *interface,
const wpa_dbus_object_desc *obj_dsc) {
const char *interfacea;
const char *patha;
DBusConnection *cona;
DBusMessage *msg;
DBusMessageIter signal_iter... | static void
do_send_prop_changed_signal(DBusConnection *con, const char *path,
const char *interface,
const struct wpa_dbus_object_desc *obj_dsc) {
DBusMessage *msg;
DBusMessageIter signal_iter, dict_iter;
msg = dbus_message_new_signal(path, DBUS_INTERFACE_... | do_send_prop_changed_signal | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int domain_name_list_contains(wpabuf *domain_names, const char *domain,
int exact_match) {
u8 *v3;
u8 elen;
const u8 *pos;
const u8 *posa;
unsigned long len;
const u8 *end;
len = strlen(domain);
pos = (const u8 *)wpabuf_head_21(domain_names);
end = &pos[wpabuf_len_21(dom... | int domain_name_list_contains(struct wpabuf *domain_names, const char *domain,
int exact_match) {
const u8 *pos, *end;
size_t len;
len = os_strlen(domain);
pos = wpabuf_head(domain_names);
end = pos + wpabuf_len(domain_names);
while (end - pos > 1) {
u8 elen;
elen = ... | domain_name_list_contains | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_2(&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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_2(&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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_7(msg, 4u);
wpabuf_put_u8_7(msg, 9u);
wpabuf_put_be24_0(msg, 0x506F9Au);
wpabuf_put_u8_7(msg, 0x1Au);
wpabuf_put_u8_7(msg, 1u);
wpabuf_put_u8_7(msg, t... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_bootstrap_info *dpp_bootstrap_find_chirp(dpp_global *dpp, const u8 *hash) {
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 (!bi->own && !memcmp(b... | struct dpp_bootstrap_info *dpp_bootstrap_find_chirp(struct dpp_global *dpp,
const u8 *hash) {
struct dpp_bootstrap_info *bi;
if (!dpp)
return NULL;
dl_list_for_each(bi, &dpp->bootstrap, struct dpp_bootstrap_info, list) {
if (!bi->own && os_memcmp(bi->p... | dpp_bootstrap_find_chirp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_6(2, "DPP: Compressed public key (DER)", der);
v2 = wpabuf_len_13(der);
v3 = (const u8 *)wpabuf_head_13(... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_build_attr_csign_key_hash(wpabuf *msg, const u8 *hash) {
if (hash) {
wpa_printf(2, "DPP: Configurator C-sign key Hash");
wpabuf_put_le16_6(msg, 0x101Eu);
wpabuf_put_le16_6(msg, 0x20u);
wpabuf_put_data_11(msg, hash, 0x20u);
}
} | static void dpp_build_attr_csign_key_hash(struct wpabuf *msg, const u8 *hash) {
if (hash) {
wpa_printf(MSG_DEBUG, "DPP: Configurator C-sign key Hash");
wpabuf_put_le16(msg, DPP_ATTR_C_SIGN_KEY_HASH);
wpabuf_put_le16(msg, SHA256_MAC_LEN);
wpabuf_put_data(msg, hash, SHA256_MAC_LEN);
}
} | dpp_build_attr_csign_key_hash | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_7(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_6(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_7(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_attribute(dpp_configurator *conf) {
wpabuf *v1;
size_t v3;
wpabuf *conf_params;
wpabuf *attr;
v1 = dpp_build_conf_params(conf);
conf_params = asn1_encaps(v1, 0, 0x11u);
if (!conf_params)
return 0;
v3 = wpabuf_len_12(conf_params);
attr = wpabuf_alloc(v3 + 100);
if (attr) {
... | static struct wpabuf *dpp_build_attribute(struct dpp_configurator *conf) {
struct wpabuf *conf_params, *attr;
conf_params = dpp_build_conf_params(conf);
conf_params = asn1_encaps(conf_params, ASN1_CLASS_UNIVERSAL, ASN1_TAG_SET);
if (!conf_params)
return NULL;
attr = wpabuf_alloc(100 + wpabuf_len(conf_pa... | dpp_build_attribute | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_conf_params(dpp_configurator *conf) {
size_t len;
size_t lena;
wpabuf *priv_key;
wpabuf *buf;
if (!conf->pp_key)
return 0;
priv_key = crypto_ec_key_get_ecprivate_key(conf->pp_key, 0);
if (!priv_key)
return 0;
len = strlen("{\"wi-fi_tech\":\"infra\",\"discovery\":{\"ssid\":\"te... | static struct wpabuf *dpp_build_conf_params(struct dpp_configurator *conf) {
struct wpabuf *buf, *priv_key = NULL;
size_t len;
const char *conf_template = "{\"wi-fi_tech\":\"infra\",\"discovery\":{"
"\"ssid\":\"test\"},\"cred\":{\"akm\":\"dpp\"}}";
const char *connector_template =... | dpp_build_conf_params | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_10(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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;
size_t v6;
const void *v7;
const char *v9;
const char *v10;
const char *v11;
int i;
... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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;
u16 v11;
size_t v12;
size_t v13;
const u8 *v14;
size_t... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_conf_result(dpp_authentication *auth,
dpp_status_error status) {
u16 v2;
size_t v3;
size_t v4;
const u8 *v5;
size_t nonce_len;
wpabuf *clear;
wpabuf *msg;
u8 *wrapped;
const u8 *addr[2];
size_t len[3];
unsigned long v13;
v13 = __readfsqword(0x28u)... | struct wpabuf *dpp_build_conf_result(struct dpp_authentication *auth,
enum dpp_status_error status) {
struct wpabuf *msg, *clear;
size_t nonce_len, clear_len, attr_len;
const u8 *addr[2];
size_t len[2];
u8 *wrapped;
nonce_len = auth->curve->nonce_len;
clear_len = 5 + ... | dpp_build_conf_result | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_conn_status(dpp_status_error result, const u8 *ssid,
size_t ssid_len, const char *channel_list) {
size_t v5;
const void *v6;
wpabuf *json;
json = wpabuf_alloc(0x3E8u);
if (!json)
return 0;
json_start_object(json, 0);
json_add_int(json, "result", result)... | struct wpabuf *dpp_build_conn_status(enum dpp_status_error result,
const u8 *ssid, size_t ssid_len,
const char *channel_list) {
struct wpabuf *json;
json = wpabuf_alloc(1000);
if (!json)
return NULL;
json_start_object(json, NULL);
... | dpp_build_conn_status | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_conn_status_result(dpp_authentication *auth,
dpp_status_error result, const u8 *ssid,
size_t ssid_len,
const char *channel_list) {
size_t v6;
u16 v7;
u16 v8;
size_t v9;
size_t v10;
... | struct wpabuf *dpp_build_conn_status_result(struct dpp_authentication *auth,
enum dpp_status_error result,
const u8 *ssid, size_t ssid_len,
const char *channel_list) {
struct wpabuf *msg... | dpp_build_conn_status_result | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_csr(dpp_authentication *auth, const char *name) {
wpabuf *v2;
unsigned int hash_len;
size_t password_len;
crypto_csr *csr;
wpabuf *buf;
char *password;
crypto_ec_key *key;
wpabuf *priv_key;
u8 cp[72];
unsigned long v12;
v12 = __readfsqword(0x28u);
csr = 0;
buf = 0;
hash_le... | struct wpabuf *dpp_build_csr(struct dpp_authentication *auth,
const char *name) {
struct crypto_csr *csr = NULL;
struct wpabuf *buf = NULL;
struct crypto_ec_key *key;
unsigned int hash_len = auth->curve->hash_len;
struct wpabuf *priv_key;
u8 cp[DPP_CP_LEN];
char *password = NU... | dpp_build_csr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_enc_cont_info(dpp_authentication *auth, size_t hash_len,
const wpabuf *cont_enc_key) {
u8 *v4;
size_t v5;
const u8 *v6;
size_t v7;
const u8 *v8;
size_t v9;
size_t v10;
size_t v11;
wpabuf *enc_cont_info;
wpabuf *enc_cont;
const asn1_oid *oid;
wpab... | static struct wpabuf *
dpp_build_enc_cont_info(struct dpp_authentication *auth, size_t hash_len,
const struct wpabuf *cont_enc_key) {
struct wpabuf *key_pkg, *enc_cont_info = NULL, *enc_cont = NULL, *enc_alg;
const struct asn1_oid *oid;
size_t enc_cont_len;
if (hash_len == 32)
oid =... | dpp_build_enc_cont_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_enveloped_data(dpp_authentication *auth) {
size_t v2;
size_t v3;
wpabuf *env;
wpabuf *enva;
wpabuf *recipient_info;
wpabuf *enc_cont_info;
wpabuf *cont_enc_key;
size_t hash_len;
recipient_info = 0;
enc_cont_info = 0;
if (auth->conf) {
if (auth->provision_configurator) {
... | struct wpabuf *dpp_build_enveloped_data(struct dpp_authentication *auth) {
struct wpabuf *env = NULL;
struct wpabuf *recipient_info = NULL, *enc_cont_info = NULL;
struct wpabuf *cont_enc_key = NULL;
size_t hash_len;
if (!auth->conf) {
wpa_printf(MSG_DEBUG, "DPP: No Configurator instance selected for the ... | dpp_build_enveloped_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_key_alg(const dpp_curve_params *curve) {
wpabuf *result;
const asn1_oid *oid;
wpabuf *params;
wpabuf *res;
switch (curve->ike_group) {
case 0x13u:
oid = &asn1_prime256v1_oid;
goto LABEL_9;
case 0x14u:
oid = &asn1_secp384r1_oid;
goto LABEL_9;
case 0x15u:
oid = &asn1... | static struct wpabuf *dpp_build_key_alg(const struct dpp_curve_params *curve) {
const struct asn1_oid *oid;
struct wpabuf *params, *res;
switch (curve->ike_group) {
case 19:
oid = &asn1_prime256v1_oid;
break;
case 20:
oid = &asn1_secp384r1_oid;
break;
case 21:
oid = &asn1_secp521r1_oid;... | dpp_build_key_alg | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_key_pkg(dpp_authentication *auth) {
wpabuf *v2;
size_t v3;
size_t v4;
size_t v5;
size_t v6;
wpabuf *v7;
wpabuf *key;
wpabuf *priv_key;
wpabuf *alg;
wpabuf *attr;
key = 0;
priv_key = crypto_ec_key_get_ecprivate_key(auth->conf->csign, 0);
if (!priv_key)
return 0;
alg = d... | static struct wpabuf *dpp_build_key_pkg(struct dpp_authentication *auth) {
struct wpabuf *key = NULL, *attr, *alg, *priv_key = NULL;
priv_key = crypto_ec_key_get_ecprivate_key(auth->conf->csign, false);
if (!priv_key)
return NULL;
alg = dpp_build_key_alg(auth->conf->curve);
attr = dpp_build_attribute(a... | dpp_build_key_pkg | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_pbkdf2_alg_id(const wpabuf *salt, size_t hash_len) {
size_t v2;
size_t v3;
wpabuf *params;
wpabuf *buf;
wpabuf *prf;
const asn1_oid *oid;
params = 0;
buf = 0;
prf = 0;
switch (hash_len) {
case ' ':
oid = &asn1_pbkdf2_hmac_sha256_oid;
break;
case '0':
oid = &asn1_pb... | static struct wpabuf *dpp_build_pbkdf2_alg_id(const struct wpabuf *salt,
size_t hash_len) {
struct wpabuf *params = NULL, *buf = NULL, *prf = NULL;
const struct asn1_oid *oid;
if (hash_len == 32)
oid = &asn1_pbkdf2_hmac_sha256_oid;
else if (hash_len == 48)
... | dpp_build_pbkdf2_alg_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_presence_announcement(dpp_bootstrap_info *bi) {
wpabuf *msg;
wpa_printf(2, "DPP: Build Presence Announcement frame");
msg = dpp_alloc_msg(dpp_public_action_frame_type_DPP_PA_PRESENCE_ANNOUNCEMENT,
0x24u);
if (!msg)
return 0;
dpp_build_attr_r_bootstrap_key_hash(msg,... | struct wpabuf *dpp_build_presence_announcement(struct dpp_bootstrap_info *bi) {
struct wpabuf *msg;
wpa_printf(MSG_DEBUG, "DPP: Build Presence Announcement frame");
msg = dpp_alloc_msg(DPP_PA_PRESENCE_ANNOUNCEMENT, 4 + SHA256_MAC_LEN);
if (!msg)
return NULL;
dpp_build_attr_r_bootstrap_key_hash(msg, bi-... | dpp_build_presence_announcement | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_pw_recipient_info(dpp_authentication *auth, size_t hash_len,
const wpabuf *cont_enc_key) {
unsigned char *v3;
const u8 *v4;
u8 *v5;
size_t v6;
const u8 *v7;
size_t v8;
size_t v9;
size_t v10;
size_t v11;
wpabuf *pwri;
wpabuf *enc_key;
wpabuf *... | static struct wpabuf *
dpp_build_pw_recipient_info(struct dpp_authentication *auth, size_t hash_len,
const struct wpabuf *cont_enc_key) {
struct wpabuf *pwri = NULL, *enc_key = NULL, *key_der_alg = NULL,
*key_enc_alg = NULL, *salt;
u8 kek[DPP_MAX_HASH_LEN];
u8 key[DPP_M... | dpp_build_pw_recipient_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_recipient_info(dpp_authentication *auth, size_t hash_len,
const wpabuf *cont_enc_key) {
wpabuf *pwri;
pwri = dpp_build_pw_recipient_info(auth, hash_len, cont_enc_key);
return asn1_encaps(pwri, 2u, 3u);
} | static struct wpabuf *
dpp_build_recipient_info(struct dpp_authentication *auth, size_t hash_len,
const struct wpabuf *cont_enc_key) {
struct wpabuf *pwri;
pwri = dpp_build_pw_recipient_info(auth, hash_len, cont_enc_key);
return asn1_encaps(pwri, ASN1_CLASS_CONTEXT_SPECIFIC, 3);
} | dpp_build_recipient_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_build_reconfig_announcement(const u8 *csign_key,
size_t csign_key_len,
const u8 *net_access_key,
size_t net_access_key_len,
dpp_reconfig_id *id) {
... | struct wpabuf *dpp_build_reconfig_announcement(const u8 *csign_key,
size_t csign_key_len,
const u8 *net_access_key,
size_t net_access_key_len,
... | dpp_build_reconfig_announcement | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_6(pos);
posb = pos + 2;
alen = WPA_GET_LE16_6(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_13(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *dpp_conf_req_rx(dpp_authentication *auth, const u8 *attr_start,
size_t attr_len) {
const char *v4;
unsigned int v5;
size_t v6;
const void *v7;
u16 wrapped_data_len;
u16 e_nonce_len;
u16 config_attr_len;
dpp_netrole netrole;
int i;
int id;
int res;
int *opclass;
... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_conf_resp_env_data(dpp_authentication *auth, const u8 *env_data,
size_t env_data_len) {
int res;
int resa;
size_t key_len;
size_t cont_encr_key_len;
size_t key_pkg_len;
u8 *key_pkg;
dpp_asymmetric_key *keys;
dpp_enveloped_data data;
u8 key[64];
u8 kek[64];
u8 con... | int dpp_conf_resp_env_data(struct dpp_authentication *auth, const u8 *env_data,
size_t env_data_len) {
u8 key[DPP_MAX_HASH_LEN];
size_t key_len;
u8 kek[DPP_MAX_HASH_LEN];
u8 cont_encr_key[DPP_MAX_HASH_LEN];
size_t cont_encr_key_len;
int res;
u8 *key_pkg;
size_t key_pkg_len;
... | dpp_conf_resp_env_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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;
int ret;
size_t csrattrs_len;
const u8 *conf_obj;
u8 *unwra... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_status_error dpp_conf_result_rx(dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len) {
u16 wrapped_data_len;
u16 status_len;
u16 e_nonce_len;
dpp_status_error ret;
u8 *unwrapped;
size_t unwrapped_len;
const u8 *wrapped_data;
const u8 *e_... | enum dpp_status_error dpp_conf_result_rx(struct dpp_authentication *auth,
const u8 *hdr, const u8 *attr_start,
size_t attr_len) {
const u8 *wrapped_data, *status, *e_nonce;
u16 wrapped_data_len, status_len, e_nonce_len;
const u8 *ad... | dpp_conf_result_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_configurator_build_own_connector(dpp_configurator *conf,
const dpp_curve_params *curve) {
const char *v3;
int ret;
wpabuf *dppcon;
dppcon = 0;
ret = -1;
if (conf->connector)
return 0;
wpa_printf(
2,
"DPP: Sign own Configurator Connector for... | static int
dpp_configurator_build_own_connector(struct dpp_configurator *conf,
const struct dpp_curve_params *curve) {
struct wpabuf *dppcon = NULL;
int ret = -1;
if (conf->connector)
return 0;
wpa_printf(
MSG_DEBUG,
"DPP: Sign own Configurator Connector fo... | dpp_configurator_build_own_connector | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_configurator *dpp_configurator_find_kid(dpp_global *dpp, const u8 *kid) {
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 (!memcmp(conf->k... | struct dpp_configurator *dpp_configurator_find_kid(struct dpp_global *dpp,
const u8 *kid) {
struct dpp_configurator *conf;
if (!dpp)
return NULL;
dl_list_for_each(conf, &dpp->configurator, struct dpp_configurator, list) {
if (os_memcmp(conf->kid_hash, k... | dpp_configurator_find_kid | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_configurator_from_backup(dpp_global *dpp, dpp_asymmetric_key *key) {
u16 v3;
u16 v4;
const dpp_curve_params *curve;
const dpp_curve_params *curve_pp;
dpp_configurator *conf;
if (!key->csign || !key->pp_key)
return -1;
v3 = crypto_ec_key_group(key->csign);
curve = dpp_get_curve_ike_group(v3)... | int dpp_configurator_from_backup(struct dpp_global *dpp,
struct dpp_asymmetric_key *key) {
struct dpp_configurator *conf;
const struct dpp_curve_params *curve, *curve_pp;
if (!key->csign || !key->pp_key)
return -1;
curve = dpp_get_curve_ike_group(crypto_ec_key_group(key->c... | dpp_configurator_from_backup | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_10(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_10(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_status_error dpp_conn_status_result_rx(dpp_authentication *auth,
const u8 *hdr, const u8 *attr_start,
size_t attr_len, u8 *ssid,
size_t *ssid_len,
... | enum dpp_status_error
dpp_conn_status_result_rx(struct dpp_authentication *auth, const u8 *hdr,
const u8 *attr_start, size_t attr_len, u8 *ssid,
size_t *ssid_len, char **channel_list) {
const u8 *wrapped_data, *status, *e_nonce;
u16 wrapped_data_len, status_len, e... | dpp_conn_status_result_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_conn_tx_ready(int sock, void *eloop_ctx, void *sock_ctx) {
wpa_printf(2, "DPP: TCP socket %d ready for TX", sock);
dpp_tcp_send((dpp_connection *)eloop_ctx);
} | static void dpp_conn_tx_ready(int sock, void *eloop_ctx, void *sock_ctx) {
struct dpp_connection *conn = eloop_ctx;
wpa_printf(MSG_DEBUG, "DPP: TCP socket %d ready for TX", sock);
dpp_tcp_send(conn);
} | dpp_conn_tx_ready | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_connection_free(dpp_connection *conn) {
if (conn->sock >= 0) {
wpa_printf(2, "DPP: Close Controller socket %d", conn->sock);
eloop_unregister_sock(conn->sock, EVENT_TYPE_READ);
eloop_unregister_sock(conn->sock, EVENT_TYPE_WRITE);
close(conn->sock);
}
eloop_cancel_timeout(
(eloop_tim... | static void dpp_connection_free(struct dpp_connection *conn) {
if (conn->sock >= 0) {
wpa_printf(MSG_DEBUG, "DPP: Close Controller socket %d", conn->sock);
eloop_unregister_sock(conn->sock, EVENT_TYPE_READ);
eloop_unregister_sock(conn->sock, EVENT_TYPE_WRITE);
close(conn->sock);
}
eloop_cancel_tim... | dpp_connection_free | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_connection_remove(dpp_connection *conn) {
dl_list_del_4(&conn->list);
dpp_connection_free(conn);
} | static void dpp_connection_remove(struct dpp_connection *conn) {
dl_list_del(&conn->list);
dpp_connection_free(conn);
} | dpp_connection_remove | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_auth_success(dpp_connection *conn, int initiator) {
dpp_authentication *auth;
auth = conn->auth;
if (auth) {
wpa_printf(2, "DPP: Authentication succeeded");
wpa_msg(conn->msg_ctx, 3, "DPP-AUTH-SUCCESS init=%d", initiator);
if (!auth->configurator)
dpp_controller_start_gas_cl... | static void dpp_controller_auth_success(struct dpp_connection *conn,
int initiator) {
struct dpp_authentication *auth = conn->auth;
if (!auth)
return;
wpa_printf(MSG_DEBUG, "DPP: Authentication succeeded");
wpa_msg(conn->msg_ctx, MSG_INFO, DPP_EVENT_AUTH_SUCCESS "in... | dpp_controller_auth_success | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_conn_status_result_wait_timeout(void *eloop_ctx,
void *timeout_ctx) {
if (*(_DWORD *)(*((_QWORD *)eloop_ctx + 5) + 1004LL)) {
wpa_printf(2, "DPP: Timeout while waiting for Connection Status Result");
wpa_msg(*((void **)eloop_ctx + 6), 3, ... | void dpp_controller_conn_status_result_wait_timeout(void *eloop_ctx,
void *timeout_ctx) {
struct dpp_connection *conn = eloop_ctx;
if (!conn->auth->waiting_conf_result)
return;
wpa_printf(MSG_DEBUG,
"DPP: Timeout while waiting for Connection S... | dpp_controller_conn_status_result_wait_timeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_free(dpp_controller *ctrl) {
dpp_connection *conn;
dpp_connection *tmp;
if (ctrl) {
conn = (dpp_connection *)ctrl->conn.next;
tmp = (dpp_connection *)conn->list.next;
while (conn != (dpp_connection *)&ctrl->conn) {
dpp_connection_remove(conn);
conn = tmp;
tmp = (... | static void dpp_controller_free(struct dpp_controller *ctrl) {
struct dpp_connection *conn, *tmp;
if (!ctrl)
return;
dl_list_for_each_safe(conn, tmp, &ctrl->conn, struct dpp_connection, list)
dpp_connection_remove(conn);
if (ctrl->sock >= 0) {
close(ctrl->sock);
eloop_unregister_sock(ctrl->... | dpp_controller_free | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_gas_done(dpp_connection *conn) {
dpp_authentication *auth;
auth = conn->auth;
if (auth->waiting_csr) {
wpa_printf(2, "DPP: Waiting for CSR");
*((_BYTE *)conn + 128) &= ~4u;
} else if (auth->peer_version <= 1u || auth->conf_resp_status) {
wpa_msg(conn->msg_ctx, 3, "DPP-CONF-SENT ... | static void dpp_controller_gas_done(struct dpp_connection *conn) {
struct dpp_authentication *auth = conn->auth;
if (auth->waiting_csr) {
wpa_printf(MSG_DEBUG, "DPP: Waiting for CSR");
conn->on_tcp_tx_complete_gas_done = 0;
return;
}
if (auth->peer_version >= 2 && auth->conf_resp_status == DPP_STA... | dpp_controller_gas_done | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
dpp_authentication *dpp_controller_get_auth(dpp_global *dpp, unsigned int id) {
dpp_connection *conn;
dpp_controller *ctrl;
ctrl = dpp->controller;
if (ctrl) {
for (conn = (dpp_connection *)ctrl->conn.next;
conn != (dpp_connection *)&ctrl->conn;
conn = (dpp_connection *)conn->list.next) {... | struct dpp_authentication *dpp_controller_get_auth(struct dpp_global *dpp,
unsigned int id) {
struct dpp_controller *ctrl = dpp->controller;
struct dpp_connection *conn;
if (!ctrl)
return dpp_tcp_get_auth(dpp, id);
dl_list_for_each(conn, &ctrl->conn, stru... | dpp_controller_get_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_new_qr_code(dpp_global *dpp, dpp_bootstrap_info *bi) {
dpp_connection *conn;
dpp_controller *ctrl;
dpp_authentication *auth;
ctrl = dpp->controller;
if (ctrl) {
for (conn = (dpp_connection *)ctrl->conn.next;
conn != (dpp_connection *)&ctrl->conn;
conn = (dpp_connecti... | void dpp_controller_new_qr_code(struct dpp_global *dpp,
struct dpp_bootstrap_info *bi) {
struct dpp_controller *ctrl = dpp->controller;
struct dpp_connection *conn;
if (!ctrl)
return;
dl_list_for_each(conn, &ctrl->conn, struct dpp_connection, list) {
struct dpp_authenti... | dpp_controller_new_qr_code | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_rx(int sd, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
int v5;
size_t v6;
void *v7;
int v8;
size_t v9;
size_t v10;
bool v11;
size_t v12;
size_t v13;
int res;
int resa;
u32 msglen;
const u8 *pos;
wpa_printf(2, "DPP: TCP data available for reading (sock %d)",... | static void dpp_controller_rx(int sd, void *eloop_ctx, void *sock_ctx) {
struct dpp_connection *conn = eloop_ctx;
int res;
const u8 *pos;
wpa_printf(MSG_DEBUG, "DPP: TCP data available for reading (sock %d)", sd);
if (conn->msg_len_octets < 4) {
u32 msglen;
res = recv(sd, &conn->msg_len[conn->msg_l... | dpp_controller_rx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_action(dpp_connection *conn, const u8 *msg, size_t len) {
int result;
u8 type;
const u8 *pos;
const u8 *end;
wpa_printf(2, "DPP: Received DPP Action frame over TCP");
end = &msg[len];
if ((long)len > 5 && WPA_GET_BE24(msg) == 5271450 && msg[3] == 26) {
if (msg[4] == 1) {
t... | static int dpp_controller_rx_action(struct dpp_connection *conn, const u8 *msg,
size_t len) {
const u8 *pos, *end;
u8 type;
wpa_printf(MSG_DEBUG, "DPP: Received DPP Action frame over TCP");
pos = msg;
end = msg + len;
if (end - pos < DPP_HDR_LEN || WPA_GET_BE24(pos) != ... | dpp_controller_rx_action | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_auth_conf(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
dpp_authentication *auth;
auth = conn->auth;
wpa_printf(2, "DPP: Authentication Confirmation");
if (auth) {
if (dpp_auth_conf_rx(auth, hdr, buf, len) >= 0) {
dpp_controlle... | static int dpp_controller_rx_auth_conf(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
struct dpp_authentication *auth = conn->auth;
wpa_printf(MSG_DEBUG, "DPP: Authentication Confirmation");
if (!auth) {
... | dpp_controller_rx_auth_conf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_auth_req(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
u16 r_bootstrap_len;
u16 i_bootstrap_len;
dpp_bootstrap_info *own_bi;
dpp_bootstrap_info *pee... | static int dpp_controller_rx_auth_req(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
const u8 *r_bootstrap, *i_bootstrap;
u16 r_bootstrap_len, i_bootstrap_len;
struct dpp_bootstrap_info *own_bi = NULL, *peer_bi =... | dpp_controller_rx_auth_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_auth_resp(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
int res;
dpp_authentication *auth;
wpabuf *msg;
auth = conn->auth;
if (!auth)
return -1;
wpa_printf(2, "DPP: Authentication Response");
msg = dpp_auth_resp_rx(auth, hdr, b... | static int dpp_controller_rx_auth_resp(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
struct dpp_authentication *auth = conn->auth;
struct wpabuf *msg;
int res;
if (!auth)
return -1;
wpa_printf(MSG_DE... | dpp_controller_rx_auth_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_conf_result(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
long v4;
long v5;
size_t lena;
const u8 *bufa;
const u8 *hdra;
dpp_status_error status;
dpp_authentication *auth;
void *msg_ctx;
auth = conn->auth;
msg_ctx = conn->m... | static int dpp_controller_rx_conf_result(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
struct dpp_authentication *auth = conn->auth;
enum dpp_status_error status;
void *msg_ctx = conn->msg_ctx;
if (!con... | dpp_controller_rx_conf_result | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_conn_status_result(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
long v5;
long v6;
long v7;
long v8;
char *v9;
const char *v10;
dpp_status_error status;
size_t ssid_len;
char *channel_list;
dpp_authentication *auth;
... | static int dpp_controller_rx_conn_status_result(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
struct dpp_authentication *auth = conn->auth;
enum dpp_status_error status;
u8 ssid[SSID_MAX_LEN]... | dpp_controller_rx_conn_status_result | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_gas_comeback_req(dpp_connection *conn, const u8 *msg,
size_t len) {
dpp_authentication *auth;
wpabuf *resp;
auth = conn->auth;
if (!len)
return -1;
wpa_printf(2, "DPP: Received DPP Configuration Request over TCP (comeback)");
if (auth && (con... | static int dpp_controller_rx_gas_comeback_req(struct dpp_connection *conn,
const u8 *msg, size_t len) {
u8 dialog_token;
struct dpp_authentication *auth = conn->auth;
struct wpabuf *resp;
if (len < 1)
return -1;
wpa_printf(MSG_DEBUG,
"DPP: Recei... | dpp_controller_rx_gas_comeback_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_gas_req(dpp_connection *conn, const u8 *msg, size_t len) {
u16 slen;
u16 slena;
dpp_authentication *auth;
const u8 *pos;
const u8 *end;
const u8 *next;
wpabuf *resp;
auth = conn->auth;
if (len <= 2)
return -1;
wpa_printf(2, "DPP: Received DPP Configuration Request over TCP... | static int dpp_controller_rx_gas_req(struct dpp_connection *conn, const u8 *msg,
size_t len) {
const u8 *pos, *end, *next;
const u8 *adv_proto;
u16 slen;
struct wpabuf *resp;
struct dpp_authentication *auth = conn->auth;
if (len < 1 + 2)
return -1;
wpa_printf(MSG... | dpp_controller_rx_gas_req | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_presence_announcement(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
long v5;
long v6;
long v7;
u16 r_bootstrap_len;
dpp_global *dpp;
const u8 *r_bootstrap;
dpp_bootstrap_info *peer_bi;
dpp_authentication *auth;
unsig... | static int dpp_controller_rx_presence_announcement(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
const u8 *r_bootstrap;
u16 r_bootstrap_len;
struct dpp_bootstrap_info *peer_bi;
struct... | dpp_controller_rx_presence_announcement | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_reconfig_announcement(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
long v4;
long v5;
long v7;
long v8;
long v9;
long v10;
long v11;
long v12;
u16 csign_hash_len;
u16 fcgroup_len;
u16 a_nonce_len;
u16 e_id_len;... | static int dpp_controller_rx_reconfig_announcement(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
const u8 *csign_hash, *fcgroup, *a_nonce, *e_id;
u16 csign_hash_len, fcgroup_len, a_nonce_... | dpp_controller_rx_reconfig_announcement | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_rx_reconfig_auth_resp(dpp_connection *conn, const u8 *hdr,
const u8 *buf, size_t len) {
int res;
dpp_authentication *auth;
wpabuf *conf;
auth = conn->auth;
wpa_printf(2, "DPP: Reconfig Authentication Response");
if (auth && auth->reconfig && auth-... | static int dpp_controller_rx_reconfig_auth_resp(struct dpp_connection *conn,
const u8 *hdr, const u8 *buf,
size_t len) {
struct dpp_authentication *auth = conn->auth;
struct wpabuf *conf;
int res;
wpa_printf(MSG_DEB... | dpp_controller_rx_reconfig_auth_resp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int dpp_controller_start(dpp_global *dpp, dpp_controller_config *config) {
int *v3;
char *v4;
int *v5;
char *v6;
int tcp_port;
int *v8;
char *v9;
int on;
int port;
dpp_controller *ctrl;
sockaddr_in sin;
unsigned long v14;
v14 = __readfsqword(0x28u);
on = 1;
if (!dpp || dpp->controller)
... | int dpp_controller_start(struct dpp_global *dpp,
struct dpp_controller_config *config) {
struct dpp_controller *ctrl;
int on = 1;
struct sockaddr_in sin;
int port;
if (!dpp || dpp->controller)
return -1;
ctrl = os_zalloc(sizeof(*ctrl));
if (!ctrl)
return -1;
ctrl->glob... | dpp_controller_start | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_start_gas_client(dpp_connection *conn) {
char *name;
wpabuf *buf;
if (conn->name)
name = conn->name;
else
name = "Test";
buf = dpp_build_conf_req_helper(conn->auth, name, conn->netrole, 0, 0);
if (buf) {
dpp_tcp_send_msg(conn, buf);
wpabuf_free(buf);
} else {
wpa_p... | static void dpp_controller_start_gas_client(struct dpp_connection *conn) {
struct dpp_authentication *auth = conn->auth;
struct wpabuf *buf;
const char *dpp_name;
dpp_name = conn->name ? conn->name : "Test";
buf = dpp_build_conf_req_helper(auth, dpp_name, conn->netrole, NULL, NULL);
if (!buf) {
wpa_pri... | dpp_controller_start_gas_client | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_stop(dpp_global *dpp) {
if (dpp) {
dpp_controller_free(dpp->controller);
dpp->controller = 0;
}
} | void dpp_controller_stop(struct dpp_global *dpp) {
if (dpp) {
dpp_controller_free(dpp->controller);
dpp->controller = NULL;
}
} | dpp_controller_stop | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_stop_for_ctx(dpp_global *dpp, void *cb_ctx) {
if (dpp && dpp->controller && cb_ctx == dpp->controller->cb_ctx)
dpp_controller_stop(dpp);
} | void dpp_controller_stop_for_ctx(struct dpp_global *dpp, void *cb_ctx) {
if (dpp && dpp->controller && dpp->controller->cb_ctx == cb_ctx)
dpp_controller_stop(dpp);
} | dpp_controller_stop_for_ctx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_controller_tcp_cb(int sd, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
int v5;
char *v6;
int *v7;
char *v8;
socklen_t addr_len;
int fd;
dpp_controller *ctrl;
dpp_connection *conn;
sockaddr_in addr;
unsigned long v14;
v14 = __readfsqword(0x28u);
ctrl = (dpp_controller *)elo... | static void dpp_controller_tcp_cb(int sd, void *eloop_ctx, void *sock_ctx) {
struct dpp_controller *ctrl = eloop_ctx;
struct sockaddr_in addr;
socklen_t addr_len = sizeof(addr);
int fd;
struct dpp_connection *conn;
wpa_printf(MSG_DEBUG, "DPP: New TCP connection");
fd = accept(ctrl->sock, (struct sockadd... | dpp_controller_tcp_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void dpp_copy_netaccesskey(dpp_authentication *auth, dpp_config_obj *conf) {
crypto_ec_key *own_key;
wpabuf *net_access_key;
own_key = auth->own_protocol_key;
if (auth->reconfig_connector_key == dpp_connector_key_DPP_CONFIG_REUSEKEY &&
auth->reconfig_old_protocol_key)
own_key = auth->reconfig_old_pro... | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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_0(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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
crypto_ec_point *dpp_decrypt_e_id(crypto_ec_key *ppkey, crypto_ec_key *a_nonce,
crypto_ec_key *e_prime_id) {
int v4;
const crypto_ec_point *e_id;
crypto_ec *ec;
const crypto_bignum *pp;
const crypto_ec_point *a_nonce_point;
const crypto_ec_point *e_prime_id_point;
if (!p... | struct crypto_ec_point *dpp_decrypt_e_id(struct crypto_ec_key *ppkey,
struct crypto_ec_key *a_nonce,
struct crypto_ec_key *e_prime_id) {
struct crypto_ec *ec;
const struct crypto_bignum *pp;
struct crypto_ec_point *e_id = NULL;
co... | dpp_decrypt_e_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | 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 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.