input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int eap_fast_derive_key_auth(eap_sm *sm, eap_fast_data *data) {
u8 *sks;
sks = eap_fast_derive_key(sm->ssl_ctx, data->ssl.conn, 0x28u);
if (sks) {
wpa_hexdump_key(2, "EAP-FAST: session_key_seed (SKS = S-IMCK[0])", sks,
0x28u);
data->simck_idx = 0;
memcpy(data->simck, sks, sizeof(d... | static int eap_fast_derive_key_auth(struct eap_sm *sm,
struct eap_fast_data *data) {
u8 *sks;
sks = eap_fast_derive_key(sm->ssl_ctx, data->ssl.conn, EAP_FAST_SKS_LEN);
if (sks == NULL) {
wpa_printf(MSG_DEBUG, "EAP-FAST: Failed to derive "
"session... | eap_fast_derive_key_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_derive_key_provisioning(eap_sm *sm, eap_fast_data *data) {
free(data->key_block_p);
data->key_block_p = (eap_fast_key_block_provisioning *)eap_fast_derive_key(
sm->ssl_ctx, data->ssl.conn, 0x48u);
if (data->key_block_p) {
wpa_hexdump_key(2, "EAP-FAST: session_key_seed (SKS = S-IMCK[0])",
... | static int eap_fast_derive_key_provisioning(struct eap_sm *sm,
struct eap_fast_data *data) {
os_free(data->key_block_p);
data->key_block_p =
(struct eap_fast_key_block_provisioning *)eap_fast_derive_key(
sm->ssl_ctx, data->ssl.conn, sizeof(*data->key_block... | eap_fast_derive_key_provisioning | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_derive_keys(eap_sm *sm, eap_fast_data *data) {
if (data->anon_provisioning)
return eap_fast_derive_key_provisioning(sm, data);
else
return eap_fast_derive_key_auth(sm, data);
} | static int eap_fast_derive_keys(struct eap_sm *sm, struct eap_fast_data *data) {
int res;
if (data->anon_provisioning)
res = eap_fast_derive_key_provisioning(sm, data);
else
res = eap_fast_derive_key_auth(sm, data);
return res;
} | eap_fast_derive_keys | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_derive_msk(eap_fast_data *data) {
if (eap_fast_derive_eap_msk(data->simck, data->key_data) < 0 ||
eap_fast_derive_eap_emsk(data->simck, data->emsk) < 0)
return -1;
data->success = 1;
return 0;
} | static int eap_fast_derive_msk(struct eap_fast_data *data) {
if (eap_fast_derive_eap_msk(data->simck, data->key_data) < 0 ||
eap_fast_derive_eap_emsk(data->simck, data->emsk) < 0)
return -1;
data->success = 1;
return 0;
} | eap_fast_derive_msk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_encrypt_response(eap_sm *sm, eap_fast_data *data, wpabuf *resp,
u8 identifier, wpabuf **out_data) {
if (!resp)
return 0;
wpa_hexdump_buf_17(2, "EAP-FAST: Encrypting Phase 2 data", resp);
if (eap_peer_tls_encrypt(sm, &data->ssl, eap_type_EAP_TYPE_FAST,
... | static int eap_fast_encrypt_response(struct eap_sm *sm,
struct eap_fast_data *data,
struct wpabuf *resp, u8 identifier,
struct wpabuf **out_data) {
if (resp == NULL)
return 0;
wpa_hexdump_buf(MSG_DEBU... | eap_fast_encrypt_response | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_free_pac(eap_fast_pac *pac) {
free(pac->pac_opaque);
free(pac->pac_info);
free(pac->a_id);
free(pac->i_id);
free(pac->a_id_info);
free(pac);
} | void eap_fast_free_pac(struct eap_fast_pac *pac) {
os_free(pac->pac_opaque);
os_free(pac->pac_info);
os_free(pac->a_id);
os_free(pac->i_id);
os_free(pac->a_id_info);
os_free(pac);
} | eap_fast_free_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_fast_getKey(eap_sm *sm, void *priv, size_t *len) {
u8 *key;
if (!*((_DWORD *)priv + 80))
return 0;
key = (u8 *)os_memdup((char *)priv + 176, 0x40u);
if (!key)
return 0;
*len = 64;
return key;
} | static u8 *eap_fast_getKey(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_fast_data *data = priv;
u8 *key;
if (!data->success)
return NULL;
key = os_memdup(data->key_data, EAP_FAST_KEY_LEN);
if (key == NULL)
return NULL;
*len = EAP_FAST_KEY_LEN;
return key;
} | eap_fast_getKey | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_fast_get_a_id(const u8 *buf, size_t len, size_t *id_len) {
int tlen;
const u8 *a_id;
a_id = buf;
*id_len = len;
if (len > 4) {
tlen = _bswap_16_4(*((_WORD *)buf + 1));
if (_bswap_16_4(*(_WORD *)buf) == 4 && len >= tlen + 4LL) {
wpa_printf(2, "EAP-FAST: A-ID was in TLV (Start)");
... | static const u8 *eap_fast_get_a_id(const u8 *buf, size_t len, size_t *id_len) {
const u8 *a_id;
const struct pac_tlv_hdr *hdr;
a_id = buf;
*id_len = len;
if (len > sizeof(*hdr)) {
int tlen;
hdr = (const struct pac_tlv_hdr *)buf;
tlen = be_to_host16(hdr->len);
if (be_to_host16(hdr->type) == PA... | eap_fast_get_a_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_get_cmk(eap_sm *sm, eap_fast_data *data, u8 *cmk) {
u8 isk[32];
u8 imck[72];
unsigned long v7;
v7 = __readfsqword(0x28u);
wpa_printf(2, "EAP-FAST: Determining CMK[%d] for Compound MIC calculation",
data->simck_idx + 1);
if (eap_fast_get_phase2_key(sm, data, isk, 0x20u) < 0)
re... | static int eap_fast_get_cmk(struct eap_sm *sm, struct eap_fast_data *data,
u8 *cmk) {
u8 isk[32], imck[60];
wpa_printf(MSG_DEBUG,
"EAP-FAST: Determining CMK[%d] for Compound MIC "
"calculation",
data->simck_idx + 1);
if (eap_fast_get_phase2_key(... | eap_fast_get_cmk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_fast_get_emsk(eap_sm *sm, void *priv, size_t *len) {
u8 *key;
if (!*((_DWORD *)priv + 80))
return 0;
key = (u8 *)os_memdup((char *)priv + 256, 0x40u);
if (!key)
return 0;
*len = 64;
return key;
} | static u8 *eap_fast_get_emsk(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_fast_data *data = priv;
u8 *key;
if (!data->success)
return NULL;
key = os_memdup(data->emsk, EAP_EMSK_LEN);
if (key == NULL)
return NULL;
*len = EAP_EMSK_LEN;
return key;
} | eap_fast_get_emsk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_fast_pac *eap_fast_get_pac(eap_fast_pac *pac_root, const u8 *a_id,
size_t a_id_len, u16 pac_type) {
while (pac_root) {
if (pac_type == pac_root->pac_type && a_id_len == pac_root->a_id_len &&
!memcmp(pac_root->a_id, a_id, a_id_len))
return pac_root;
pac_root = p... | struct eap_fast_pac *eap_fast_get_pac(struct eap_fast_pac *pac_root,
const u8 *a_id, size_t a_id_len,
u16 pac_type) {
struct eap_fast_pac *pac = pac_root;
while (pac) {
if (pac->pac_type == pac_type && pac->a_id_len == a_id_len &&
... | eap_fast_get_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_get_phase2_key(eap_sm *sm, eap_fast_data *data, u8 *isk,
size_t isk_len) {
long v5;
long v6;
size_t key_len;
u8 *key;
unsigned long v11;
v11 = __readfsqword(0x28u);
memset(isk, 0, isk_len);
if (data->phase2_method && data->phase2_priv) {
if (data->phase2_met... | static int eap_fast_get_phase2_key(struct eap_sm *sm,
struct eap_fast_data *data, u8 *isk,
size_t isk_len) {
u8 *key;
size_t key_len;
os_memset(isk, 0, isk_len);
if (data->phase2_method == NULL || data->phase2_priv == NULL) {
wpa_printf... | eap_fast_get_phase2_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_fast_get_session_id(eap_sm *sm, void *priv, size_t *len) {
u8 *id;
if (!*((_DWORD *)priv + 80) || !*((_QWORD *)priv + 30))
return 0;
id = (u8 *)os_memdup(*((const void **)priv + 30), *((_QWORD *)priv + 31));
if (!id)
return 0;
*len = *((_QWORD *)priv + 31);
return id;
} | static u8 *eap_fast_get_session_id(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_fast_data *data = priv;
u8 *id;
if (!data->success || !data->session_id)
return NULL;
id = os_memdup(data->session_id, data->id_len);
if (id == NULL)
return NULL;
*len = data->id_len;
return id;
} | eap_fast_get_session_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_get_status(eap_sm *sm, void *priv, char *buf, size_t buflen,
int verbose) {
int len;
int ret;
len = eap_peer_tls_status(sm, (eap_ssl_data *)priv, buf, buflen, verbose);
if (*((_QWORD *)priv + 12)) {
ret = snprintf(&buf[len], buflen - len, "EAP-FAST Phase2 method=%s\n",
... | static int eap_fast_get_status(struct eap_sm *sm, void *priv, char *buf,
size_t buflen, int verbose) {
struct eap_fast_data *data = priv;
int len, ret;
len = eap_peer_tls_status(sm, &data->ssl, buf, buflen, verbose);
if (data->phase2_method) {
ret = os_snprintf(buf + len, buf... | eap_fast_get_status | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void *eap_fast_init(eap_sm *sm) {
eap_peer_config *config;
eap_fast_data *data;
config = eap_get_config(sm);
if (!config)
return 0;
data = (eap_fast_data *)os_zalloc(0x1A0u);
if (!data)
return 0;
data->fast_version = 1;
data->max_pac_list_len = 10;
if (config->phase1)
eap_fast_parse_phase... | static void *eap_fast_init(struct eap_sm *sm) {
struct eap_fast_data *data;
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return NULL;
data = os_zalloc(sizeof(*data));
if (data == NULL)
return NULL;
data->fast_version = EAP_FAST_VERSION;
data->max_pac_list_len = 10;
... | eap_fast_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_init_pac_data(eap_sm *sm, const char *pac_file,
eap_fast_read_ctx *rc) {
const wpa_config_blob *blob;
memset(rc, 0, sizeof(eap_fast_read_ctx));
rc->buf_len = 2048;
rc->buf = (char *)malloc(rc->buf_len);
if (!rc->buf)
return -1;
if (!strncmp(pac_file, "blob://", 7... | static int eap_fast_init_pac_data(struct eap_sm *sm, const char *pac_file,
struct eap_fast_read_ctx *rc) {
os_memset(rc, 0, sizeof(*rc));
rc->buf_len = 2048;
rc->buf = os_malloc(rc->buf_len);
if (rc->buf == NULL)
return -1;
if (os_strncmp(pac_file, "blob://", 7) == 0) {... | eap_fast_init_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_init_phase2_method(eap_sm *sm, eap_fast_data *data) {
data->phase2_method = (const eap_method *)eap_peer_get_eap_method(
data->phase2_type.vendor, (eap_type)data->phase2_type.method);
if (!data->phase2_method)
return -1;
if (data->key_block_p) {
sm->auth_challenge = data->key_block_p->s... | static int eap_fast_init_phase2_method(struct eap_sm *sm,
struct eap_fast_data *data) {
data->phase2_method = eap_peer_get_eap_method(data->phase2_type.vendor,
data->phase2_type.method);
if (data->phase2_method == NULL)
retur... | eap_fast_init_phase2_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool eap_fast_isKeyAvailable(eap_sm *sm, void *priv) {
return *((_DWORD *)priv + 80) != 0;
} | static bool eap_fast_isKeyAvailable(struct eap_sm *sm, void *priv) {
struct eap_fast_data *data = priv;
return data->success;
} | eap_fast_isKeyAvailable | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_load_pac(eap_sm *sm, eap_fast_pac **pac_root,
const char *pac_file) {
int count;
eap_fast_pac *pac;
char *pos;
const char *err;
eap_fast_read_ctx rc;
unsigned long v10;
v10 = __readfsqword(0x28u);
pac = 0;
count = 0;
err = 0;
if (!pac_file)
return -1;
if (... | int eap_fast_load_pac(struct eap_sm *sm, struct eap_fast_pac **pac_root,
const char *pac_file) {
struct eap_fast_read_ctx rc;
struct eap_fast_pac *pac = NULL;
int count = 0;
char *pos;
const char *err = NULL;
if (pac_file == NULL)
return -1;
if (eap_fast_init_pac_data(sm, pac_f... | eap_fast_load_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_load_pac_bin(eap_sm *sm, eap_fast_pac **pac_root,
const char *pac_file) {
u16 v4;
u8 *v5;
u8 *v6;
u16 val;
u16 vala;
size_t len;
const wpa_config_blob *blob;
u8 *buf;
u8 *pos;
size_t count;
eap_fast_pac *pac;
eap_fast_pac *prev;
u8 *end;
unsigned long v... | int eap_fast_load_pac_bin(struct eap_sm *sm, struct eap_fast_pac **pac_root,
const char *pac_file) {
const struct wpa_config_blob *blob = NULL;
u8 *buf, *end, *pos;
size_t len, count = 0;
struct eap_fast_pac *pac, *prev;
*pac_root = NULL;
if (pac_file == NULL)
return -1;
i... | eap_fast_load_pac_bin | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_pac_get_a_id(eap_fast_pac *pac) {
u16 type;
u16 len;
const u8 *pos;
u8 *posb;
u8 *posa;
u8 *end;
pos = pac->pac_info;
end = (u8 *)&pos[pac->pac_info_len];
while (end - pos > 4) {
type = WPA_GET_BE16_5(pos);
posb = (u8 *)(pos + 2);
len = WPA_GET_BE16_5(posb);
posa = posb ... | static void eap_fast_pac_get_a_id(struct eap_fast_pac *pac) {
u8 *pos, *end;
u16 type, len;
pos = pac->pac_info;
end = pos + pac->pac_info_len;
while (end - pos > 4) {
type = WPA_GET_BE16(pos);
pos += 2;
len = WPA_GET_BE16(pos);
pos += 2;
if (len > (unsigned int)(end - pos))
break;... | eap_fast_pac_get_a_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t eap_fast_pac_list_truncate(eap_fast_pac *pac_root, size_t max_len) {
eap_fast_pac *prev;
eap_fast_pac *preva;
size_t count;
size_t counta;
prev = 0;
count = 0;
while (pac_root) {
if (++count > max_len)
break;
prev = pac_root;
pac_root = pac_root->next;
}
if (count <= max_len ... | size_t eap_fast_pac_list_truncate(struct eap_fast_pac *pac_root,
size_t max_len) {
struct eap_fast_pac *pac, *prev;
size_t count;
pac = pac_root;
prev = NULL;
count = 0;
while (pac) {
count++;
if (count > max_len)
break;
prev = pac;
pac = pac->next;
... | eap_fast_pac_list_truncate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_pac_request() {
u8 *v1;
wpabuf *tmp;
u8 *pos;
tmp = wpabuf_alloc(0x10u);
if (!tmp)
return 0;
pos = (u8 *)wpabuf_put(tmp, 0);
v1 = (u8 *)(eap_fast_write_pac_request(pos, 1u) - pos);
wpabuf_put(tmp, (size_t)v1);
return tmp;
} | static struct wpabuf *eap_fast_pac_request(void) {
struct wpabuf *tmp;
u8 *pos, *pos2;
tmp = wpabuf_alloc(sizeof(struct eap_tlv_hdr) +
sizeof(struct eap_tlv_request_action_tlv) +
sizeof(struct eap_tlv_pac_type_tlv));
if (tmp == NULL)
return NULL;
pos = wpabuf_pu... | eap_fast_pac_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_a_id(eap_fast_pac *pac, char *pos) {
free(pac->a_id);
pac->a_id = eap_fast_parse_hex(pos, &pac->a_id_len);
if (pac->a_id)
return 0;
else
return "Invalid A-ID";
} | static const char *eap_fast_parse_a_id(struct eap_fast_pac *pac, char *pos) {
os_free(pac->a_id);
pac->a_id = eap_fast_parse_hex(pos, &pac->a_id_len);
if (pac->a_id == NULL)
return "Invalid A-ID";
return NULL;
} | eap_fast_parse_a_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_a_id_info(eap_fast_pac *pac, char *pos) {
free(pac->a_id_info);
pac->a_id_info = eap_fast_parse_hex(pos, &pac->a_id_info_len);
if (pac->a_id_info)
return 0;
else
return "Invalid A-ID-Info";
} | static const char *eap_fast_parse_a_id_info(struct eap_fast_pac *pac,
char *pos) {
os_free(pac->a_id_info);
pac->a_id_info = eap_fast_parse_hex(pos, &pac->a_id_info_len);
if (pac->a_id_info == NULL)
return "Invalid A-ID-Info";
return NULL;
} | eap_fast_parse_a_id_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_parse_decrypted(wpabuf *decrypted, eap_fast_tlv_parse *tlv,
wpabuf **resp) {
const char *v4;
int mandatory;
int tlv_type;
int res;
u8 *pos;
u8 *posb;
u8 *posa;
u8 *end;
size_t len;
memset(tlv, 0, sizeof(eap_fast_tlv_parse));
pos = (u8 *)wpabuf_mhead_4(dec... | static int eap_fast_parse_decrypted(struct wpabuf *decrypted,
struct eap_fast_tlv_parse *tlv,
struct wpabuf **resp) {
int mandatory, tlv_type, res;
size_t len;
u8 *pos, *end;
os_memset(tlv, 0, sizeof(*tlv));
pos = wpabuf_mhead(decrypted... | eap_fast_parse_decrypted | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_end(eap_fast_pac **pac_root, eap_fast_pac **pac) {
eap_fast_pac *end;
if (!*pac)
return "END line without START";
if (*pac_root) {
for (end = *pac_root; end->next; end = end->next)
;
end->next = *pac;
} else {
*pac_root = *pac;
}
*pac = 0;
return 0;
} | static const char *eap_fast_parse_end(struct eap_fast_pac **pac_root,
struct eap_fast_pac **pac) {
if (*pac == NULL)
return "END line without START";
if (*pac_root) {
struct eap_fast_pac *end = *pac_root;
while (end->next)
end = end->next;
end->next = *pac... | eap_fast_parse_end | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_fast_parse_hex(const char *value, size_t *len) {
int hlen;
u8 *buf;
if (!value)
return 0;
hlen = strlen(value);
if ((hlen & 1) != 0)
return 0;
*len = hlen / 2;
buf = (u8 *)malloc(*len);
if (!buf)
return 0;
if (!hexstr2bin(value, buf, *len))
return buf;
free(buf);
return 0;... | static u8 *eap_fast_parse_hex(const char *value, size_t *len) {
int hlen;
u8 *buf;
if (value == NULL)
return NULL;
hlen = os_strlen(value);
if (hlen & 1)
return NULL;
*len = hlen / 2;
buf = os_malloc(*len);
if (buf == NULL)
return NULL;
if (hexstr2bin(value, buf, *len)) {
os_free(buf)... | eap_fast_parse_hex | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_i_id(eap_fast_pac *pac, char *pos) {
free(pac->i_id);
pac->i_id = eap_fast_parse_hex(pos, &pac->i_id_len);
if (pac->i_id)
return 0;
else
return "Invalid I-ID";
} | static const char *eap_fast_parse_i_id(struct eap_fast_pac *pac, char *pos) {
os_free(pac->i_id);
pac->i_id = eap_fast_parse_hex(pos, &pac->i_id_len);
if (pac->i_id == NULL)
return "Invalid I-ID";
return NULL;
} | eap_fast_parse_i_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_parse_pac_info(eap_fast_pac *entry, int type, u8 *pos,
size_t len) {
u16 pac_type;
u32 lifetime;
os_time now;
unsigned long v10;
v10 = __readfsqword(0x28u);
switch (type & 0x7FFF) {
case 3:
if (len == 4) {
lifetime = WPA_GET_BE32_6(pos);
os_get_tim... | static int eap_fast_parse_pac_info(struct eap_fast_pac *entry, int type,
u8 *pos, size_t len) {
u16 pac_type;
u32 lifetime;
struct os_time now;
switch (type & 0x7fff) {
case PAC_TYPE_CRED_LIFETIME:
if (len != 4) {
wpa_hexdump(MSG_DEBUG,
"EAP-FAST... | eap_fast_parse_pac_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_pac_key(eap_fast_pac *pac, char *pos) {
size_t key_len;
u8 *key;
unsigned long v5;
v5 = __readfsqword(0x28u);
key = eap_fast_parse_hex(pos, &key_len);
if (key && key_len == 32) {
memcpy(pac->pac_key, key, sizeof(pac->pac_key));
free(key);
return 0;
} else {
free... | static const char *eap_fast_parse_pac_key(struct eap_fast_pac *pac, char *pos) {
u8 *key;
size_t key_len;
key = eap_fast_parse_hex(pos, &key_len);
if (key == NULL || key_len != EAP_FAST_PAC_KEY_LEN) {
os_free(key);
return "Invalid PAC-Key";
}
os_memcpy(pac->pac_key, key, EAP_FAST_PAC_KEY_LEN);
o... | eap_fast_parse_pac_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_pac_opaque(eap_fast_pac *pac, char *pos) {
free(pac->pac_opaque);
pac->pac_opaque = eap_fast_parse_hex(pos, &pac->pac_opaque_len);
if (pac->pac_opaque)
return 0;
else
return "Invalid PAC-Opaque";
} | static const char *eap_fast_parse_pac_opaque(struct eap_fast_pac *pac,
char *pos) {
os_free(pac->pac_opaque);
pac->pac_opaque = eap_fast_parse_hex(pos, &pac->pac_opaque_len);
if (pac->pac_opaque == NULL)
return "Invalid PAC-Opaque";
return NULL;
} | eap_fast_parse_pac_opaque | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_parse_pac_tlv(eap_fast_pac *entry, int type, u8 *pos, size_t len,
int *pac_key_found) {
int v5;
v5 = type & 0x7FFF;
if (v5 == 9) {
wpa_hexdump(2, "EAP-FAST: PAC-Info", pos, len);
entry->pac_info = pos;
entry->pac_info_len = len;
return;
}
if ((type & ... | static void eap_fast_parse_pac_tlv(struct eap_fast_pac *entry, int type,
u8 *pos, size_t len, int *pac_key_found) {
switch (type & 0x7fff) {
case PAC_TYPE_PAC_KEY:
wpa_hexdump_key(MSG_DEBUG, "EAP-FAST: PAC-Key", pos, len);
if (len != EAP_FAST_PAC_KEY_LEN) {
wpa_print... | eap_fast_parse_pac_tlv | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_pac_type(eap_fast_pac *pac, char *pos) {
if (!pos)
return "Cannot parse pac type";
pac->pac_type = atoi(pos);
if (pac->pac_type == 1 || pac->pac_type == 3 || pac->pac_type == 2)
return 0;
else
return "Unrecognized PAC-Type";
} | static const char *eap_fast_parse_pac_type(struct eap_fast_pac *pac,
char *pos) {
if (!pos)
return "Cannot parse pac type";
pac->pac_type = atoi(pos);
if (pac->pac_type != PAC_TYPE_TUNNEL_PAC &&
pac->pac_type != PAC_TYPE_USER_AUTHORIZATION &&
pac->pac_typ... | eap_fast_parse_pac_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_parse_phase1(eap_fast_data *data, const char *phase1) {
char *pos;
char *posa;
pos = strstr(phase1, "fast_provisioning=");
if (pos) {
data->provisioning_allowed = atoi(pos + 18);
wpa_printf(2, "EAP-FAST: Automatic PAC provisioning mode: %d",
data->provisioning_allowed);
}... | static void eap_fast_parse_phase1(struct eap_fast_data *data,
const char *phase1) {
const char *pos;
pos = os_strstr(phase1, "fast_provisioning=");
if (pos) {
data->provisioning_allowed = atoi(pos + 18);
wpa_printf(MSG_DEBUG,
"EAP-FAST: Automatic PAC provi... | eap_fast_parse_phase1 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_fast_parse_start(eap_fast_pac **pac) {
if (*pac)
return "START line without END";
*pac = (eap_fast_pac *)os_zalloc(0x80u);
if (!*pac)
return "No memory for PAC entry";
(*pac)->pac_type = 1;
return 0;
} | static const char *eap_fast_parse_start(struct eap_fast_pac **pac) {
if (*pac)
return "START line without END";
*pac = os_zalloc(sizeof(struct eap_fast_pac));
if (*pac == NULL)
return "No memory for PAC entry";
(*pac)->pac_type = PAC_TYPE_TUNNEL_PAC;
return NULL;
} | eap_fast_parse_start | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_parse_tlv(eap_fast_tlv_parse *tlv, int tlv_type, u8 *pos,
size_t len) {
int result;
const char *v5;
const char *v6;
switch (tlv_type) {
case 3:
wpa_hexdump(1, "EAP-FAST: Result TLV", pos, len);
if (!tlv->result) {
if (len > 1) {
tlv->result = WPA_GET_... | int eap_fast_parse_tlv(struct eap_fast_tlv_parse *tlv, int tlv_type, u8 *pos,
size_t len) {
switch (tlv_type) {
case EAP_TLV_EAP_PAYLOAD_TLV:
wpa_hexdump(MSG_MSGDUMP, "EAP-FAST: EAP-Payload TLV", pos, len);
if (tlv->eap_payload_tlv) {
wpa_printf(MSG_DEBUG, "EAP-FAST: More than o... | eap_fast_parse_tlv | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_phase2_request(eap_sm *sm, eap_fast_data *data,
eap_method_ret *ret, eap_hdr *hdr, wpabuf **resp) {
u32 vendor;
eap_type method;
size_t len;
eap_peer_config *config;
eap_method_ret iret;
wpabuf msg;
unsigned long v15;
v15 = __readfsqword(0x28u);
len = _bswap_1... | static int eap_fast_phase2_request(struct eap_sm *sm,
struct eap_fast_data *data,
struct eap_method_ret *ret,
struct eap_hdr *hdr, struct wpabuf **resp) {
size_t len = be_to_host16(hdr->length);
u8 *pos;
struc... | eap_fast_phase2_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_process(eap_sm *sm, void *priv, eap_method_ret *ret,
const wpabuf *reqData) {
u8 flags;
u8 id;
int res;
size_t left;
wpabuf *resp;
eap_fast_data *data;
const u8 *pos;
const eap_hdr *req;
eap_peer_config *config;
wpabuf msg;
char cipher[88];
unsigned long... | static struct wpabuf *eap_fast_process(struct eap_sm *sm, void *priv,
struct eap_method_ret *ret,
const struct wpabuf *reqData) {
const struct eap_hdr *req;
size_t left;
int res;
u8 flags, id;
struct wpabuf *resp;
const u8 *pos;
... | eap_fast_process | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_process_crypto_binding(eap_sm *sm, eap_fast_data *data,
eap_method_ret *ret,
eap_tlv_crypto_binding_tlv *_bind,
size_t bind_len) {
long v6;
long v7;
int res;
wpabuf *resp;
u... | static struct wpabuf *eap_fast_process_crypto_binding(
struct eap_sm *sm, struct eap_fast_data *data, struct eap_method_ret *ret,
struct eap_tlv_crypto_binding_tlv *_bind, size_t bind_len) {
struct wpabuf *resp;
u8 *pos;
u8 cmk[EAP_FAST_CMK_LEN], cmac[SHA1_MAC_LEN];
int res;
size_t len;
if (eap_fas... | eap_fast_process_crypto_binding | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_process_decrypted(eap_sm *sm, eap_fast_data *data,
eap_method_ret *ret, u8 identifier,
wpabuf *decrypted, wpabuf **out_data) {
int v7;
int failed;
wpabuf *resp;
wpabuf *tmp;
eap_fast_tlv_parse tlv;
unsigned long v15;
v15 = __readf... | static int eap_fast_process_decrypted(struct eap_sm *sm,
struct eap_fast_data *data,
struct eap_method_ret *ret, u8 identifier,
struct wpabuf *decrypted,
struct wpabuf ... | eap_fast_process_decrypted | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_process_eap_payload_tlv(eap_sm *sm, eap_fast_data *data,
eap_method_ret *ret,
u8 *eap_payload_tlv,
size_t eap_payload_tlv_len) {
wpabuf *resp;
eap_hdr *hdr;
unsigned long v9;... | static struct wpabuf *eap_fast_process_eap_payload_tlv(
struct eap_sm *sm, struct eap_fast_data *data, struct eap_method_ret *ret,
u8 *eap_payload_tlv, size_t eap_payload_tlv_len) {
struct eap_hdr *hdr;
struct wpabuf *resp = NULL;
if (eap_payload_tlv_len < sizeof(*hdr)) {
wpa_printf(MSG_DEBUG,
... | eap_fast_process_eap_payload_tlv | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_process_pac(eap_sm *sm, eap_fast_data *data,
eap_method_ret *ret, u8 *pac, size_t pac_len) {
eap_peer_config *config;
eap_fast_pac entry;
unsigned long v11;
v11 = __readfsqword(0x28u);
config = eap_get_config(sm);
memset(&entry, 0, sizeof(entry));
if (eap_fas... | static struct wpabuf *eap_fast_process_pac(struct eap_sm *sm,
struct eap_fast_data *data,
struct eap_method_ret *ret, u8 *pac,
size_t pac_len) {
struct eap_peer_config *config = eap_get_con... | eap_fast_process_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_process_pac_info(eap_fast_pac *entry) {
int type;
u8 *pos;
u8 *posa;
size_t left;
size_t lefta;
size_t len;
entry->pac_type = 1;
pos = entry->pac_info;
for (left = entry->pac_info_len; left > 4; left = lefta - len) {
type = _bswap_16_4(*(_WORD *)pos);
len = _bswap_16_4(*((_WORD *... | static int eap_fast_process_pac_info(struct eap_fast_pac *entry) {
struct pac_tlv_hdr *hdr;
u8 *pos;
size_t left, len;
int type;
entry->pac_type = PAC_TYPE_TUNNEL_PAC;
pos = entry->pac_info;
left = entry->pac_info_len;
while (left > sizeof(*hdr)) {
hdr = (struct pac_tlv_hdr *)pos;
type = be_to... | eap_fast_process_pac_info | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_process_pac_tlv(eap_fast_pac *entry, u8 *pac, size_t pac_len) {
int pac_key_found;
int type;
u8 *pos;
size_t left;
pac_tlv_hdr *hdr;
size_t len;
unsigned long v10;
v10 = __readfsqword(0x28u);
pac_key_found = 0;
pos = pac;
for (left = pac_len; left > 4; left -= len) {
hdr = (pac_t... | static int eap_fast_process_pac_tlv(struct eap_fast_pac *entry, u8 *pac,
size_t pac_len) {
struct pac_tlv_hdr *hdr;
u8 *pos;
size_t left, len;
int type, pac_key_found = 0;
pos = pac;
left = pac_len;
while (left > sizeof(*hdr)) {
hdr = (struct pac_tlv_hdr *)pos;
... | eap_fast_process_pac_tlv | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_process_start(eap_sm *sm, eap_fast_data *data, u8 flags,
const u8 *pos, size_t left) {
size_t a_id_len;
const u8 *a_id;
unsigned long v11;
v11 = __readfsqword(0x28u);
wpa_printf(2, "EAP-FAST: Start (server ver=%d, own ver=%d)", flags & 7,
data->fast_versio... | static int eap_fast_process_start(struct eap_sm *sm, struct eap_fast_data *data,
u8 flags, const u8 *pos, size_t left) {
const u8 *a_id;
size_t a_id_len;
wpa_printf(MSG_DEBUG, "EAP-FAST: Start (server ver=%d, own ver=%d)",
flags & EAP_TLS_VERSION_MASK, data->fast_ve... | eap_fast_process_start | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_put_tlv(wpabuf *buf, u16 type, const void *data, u16 len) {
eap_fast_put_tlv_hdr(buf, type, len);
wpabuf_put_data_24(buf, data, len);
} | void eap_fast_put_tlv(struct wpabuf *buf, u16 type, const void *data, u16 len) {
eap_fast_put_tlv_hdr(buf, type, len);
wpabuf_put_data(buf, data, len);
} | eap_fast_put_tlv | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_put_tlv_buf(wpabuf *buf, u16 type, const wpabuf *data) {
u16 v3;
v3 = wpabuf_len_27(data);
eap_fast_put_tlv_hdr(buf, type, v3);
wpabuf_put_buf_11(buf, data);
} | void eap_fast_put_tlv_buf(struct wpabuf *buf, u16 type,
const struct wpabuf *data) {
eap_fast_put_tlv_hdr(buf, type, wpabuf_len(data));
wpabuf_put_buf(buf, data);
} | eap_fast_put_tlv_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_put_tlv_hdr(wpabuf *buf, u16 type, u16 len) {
pac_tlv_hdr hdr;
unsigned long v5;
v5 = __readfsqword(0x28u);
hdr.type = _bswap_16_5(type);
hdr.len = _bswap_16_5(len);
wpabuf_put_data_24(buf, &hdr, 4u);
} | void eap_fast_put_tlv_hdr(struct wpabuf *buf, u16 type, u16 len) {
struct pac_tlv_hdr hdr;
hdr.type = host_to_be16(type);
hdr.len = host_to_be16(len);
wpabuf_put_data(buf, &hdr, sizeof(hdr));
} | eap_fast_put_tlv_hdr | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_read_line(eap_fast_read_ctx *rc, char **value) {
char *v3;
char *pos;
char *posa;
const char *l_end;
size_t len;
++rc->line;
if (rc->f) {
if (!fgets(rc->buf, rc->buf_len, rc->f))
return -1;
} else {
if (rc->pos >= rc->end)
return -1;
for (l_end = rc->pos; l_end < rc... | static int eap_fast_read_line(struct eap_fast_read_ctx *rc, char **value) {
char *pos;
rc->line++;
if (rc->f) {
if (fgets(rc->buf, rc->buf_len, rc->f) == NULL)
return -1;
} else {
const char *l_end;
size_t len;
if (rc->pos >= rc->end)
return -1;
l_end = rc->pos;
while (l_end... | eap_fast_read_line | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_remove_pac(eap_fast_pac **pac_root, eap_fast_pac **pac_current,
const u8 *a_id, size_t a_id_len, u16 pac_type) {
eap_fast_pac *pac;
eap_fast_pac *prev;
pac = *pac_root;
prev = 0;
while (pac) {
if (pac_type == pac->pac_type && a_id_len == pac->a_id_len &&
!me... | static void eap_fast_remove_pac(struct eap_fast_pac **pac_root,
struct eap_fast_pac **pac_current,
const u8 *a_id, size_t a_id_len, u16 pac_type) {
struct eap_fast_pac *pac, *prev;
pac = *pac_root;
prev = NULL;
while (pac) {
if (pac->pac_type... | eap_fast_remove_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_save_pac(eap_sm *sm, eap_fast_pac *pac_root,
const char *pac_file) {
int count;
int ret;
char *buf;
char *pos;
size_t buf_len;
eap_fast_pac *pac;
unsigned long v11;
v11 = __readfsqword(0x28u);
count = 0;
if (!pac_file)
return -1;
buf_len = 1024;
buf = (cha... | int eap_fast_save_pac(struct eap_sm *sm, struct eap_fast_pac *pac_root,
const char *pac_file) {
struct eap_fast_pac *pac;
int ret, count = 0;
char *buf, *pos;
size_t buf_len;
if (pac_file == NULL)
return -1;
buf_len = 1024;
pos = buf = os_malloc(buf_len);
if (buf == NULL)
... | eap_fast_save_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_save_pac_bin(eap_sm *sm, eap_fast_pac *pac_root,
const char *pac_file) {
size_t len;
size_t count;
eap_fast_pac *pac;
eap_fast_pac *paca;
u8 *pos;
u8 *posa;
u8 *posb;
u8 *buf;
count = 0;
len = 6;
for (pac = pac_root; pac; pac = pac->next) {
if (pac->pac_... | int eap_fast_save_pac_bin(struct eap_sm *sm, struct eap_fast_pac *pac_root,
const char *pac_file) {
size_t len, count = 0;
struct eap_fast_pac *pac;
u8 *buf, *pos;
len = 6;
pac = pac_root;
while (pac) {
if (pac->pac_opaque_len > 65535 || pac->pac_info_len > 65535)
return... | eap_fast_save_pac_bin | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_select_pac(eap_fast_data *data, const u8 *a_id, size_t a_id_len) {
data->current_pac = eap_fast_get_pac(data->pac, a_id, a_id_len, 1u);
if (!data->current_pac)
data->current_pac = eap_fast_get_pac(data->pac, a_id, a_id_len, 2u);
if (data->current_pac) {
wpa_printf(2, "EAP-FAST: PAC found for... | static void eap_fast_select_pac(struct eap_fast_data *data, const u8 *a_id,
size_t a_id_len) {
data->current_pac =
eap_fast_get_pac(data->pac, a_id, a_id_len, PAC_TYPE_TUNNEL_PAC);
if (data->current_pac == NULL) {
data->current_pac = eap_fast_get_pac(data->pac, a_id, a_id_... | eap_fast_select_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_select_phase2_method(eap_fast_data *data, int vendor,
eap_type type) {
size_t i;
if (data->anon_provisioning &&
(vendor || type != eap_type_EAP_TYPE_MSCHAPV2)) {
wpa_printf(3,
"EAP-FAST: Only EAP-MSCHAPv2 is allowed during unauthenticated "
... | static int eap_fast_select_phase2_method(struct eap_fast_data *data, int vendor,
enum eap_type type) {
size_t i;
if (data->anon_provisioning &&
(vendor != EAP_VENDOR_IETF || type != EAP_TYPE_MSCHAPV2)) {
wpa_printf(MSG_INFO,
"EAP-FAST: Only EAP-MSCH... | eap_fast_select_phase2_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_session_ticket_cb(void *ctx, const u8 *ticket, size_t len,
const u8 *client_random, const u8 *server_random,
u8 *master_secret) {
wpa_printf(2, "EAP-FAST: SessionTicket callback");
if (client_random && server_random && master_secret) {
w... | static int eap_fast_session_ticket_cb(void *ctx, const u8 *ticket, size_t len,
const u8 *client_random,
const u8 *server_random,
u8 *master_secret) {
struct eap_fast_data *data = ctx;
wpa_printf(MSG_DE... | eap_fast_session_ticket_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_set_provisioning_ciphers(eap_sm *sm, eap_fast_data *data) {
int v2;
int count;
u8 ciphers[7];
unsigned long v6;
v6 = __readfsqword(0x28u);
count = 0;
if ((data->provisioning_allowed & 1) != 0) {
wpa_printf(
2, "EAP-FAST: Enabling unauthenticated provisioning TLS cipher suites");
... | static int eap_fast_set_provisioning_ciphers(struct eap_sm *sm,
struct eap_fast_data *data) {
u8 ciphers[7];
int count = 0;
if (data->provisioning_allowed & EAP_FAST_PROV_UNAUTH) {
wpa_printf(MSG_DEBUG, "EAP-FAST: Enabling unauthenticated "
... | eap_fast_set_provisioning_ciphers | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_tlv_eap_payload(wpabuf *buf) {
size_t v2;
wpabuf *e;
if (!buf)
return 0;
wpa_printf(2, "EAP-FAST: Add EAP-Payload TLV");
v2 = wpabuf_len_27(buf);
e = wpabuf_alloc(v2 + 4);
if (e) {
eap_fast_put_tlv_buf(e, 0x8009u, buf);
wpabuf_free(buf);
return e;
} else {
wpa_print... | struct wpabuf *eap_fast_tlv_eap_payload(struct wpabuf *buf) {
struct wpabuf *e;
if (buf == NULL)
return NULL;
wpa_printf(MSG_DEBUG, "EAP-FAST: Add EAP-Payload TLV");
e = wpabuf_alloc(sizeof(struct pac_tlv_hdr) + wpabuf_len(buf));
if (e == NULL) {
wpa_printf(MSG_DEBUG, "EAP-FAST: Failed to allocate m... | eap_fast_tlv_eap_payload | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_tlv_nak(int vendor_id, int tlv_type) {
wpabuf *buf;
eap_tlv_nak_tlv *nak;
buf = wpabuf_alloc(0xAu);
if (!buf)
return 0;
nak = (eap_tlv_nak_tlv *)wpabuf_put(buf, 0xAu);
nak->tlv_type = _bswap_16_4(0x8004u);
nak->length = _bswap_16_4(6u);
nak->vendor_id = _bswap_32_1(vendor_id);
na... | static struct wpabuf *eap_fast_tlv_nak(int vendor_id, int tlv_type) {
struct wpabuf *buf;
struct eap_tlv_nak_tlv *nak;
buf = wpabuf_alloc(sizeof(*nak));
if (buf == NULL)
return NULL;
nak = wpabuf_put(buf, sizeof(*nak));
nak->tlv_type = host_to_be16(EAP_TLV_TYPE_MANDATORY | EAP_TLV_NAK_TLV);
nak->lengt... | eap_fast_tlv_nak | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_tlv_pac_ack() {
wpabuf *buf;
eap_tlv_pac_ack_tlv *ack;
buf = wpabuf_alloc(0x10u);
if (!buf)
return 0;
wpa_printf(2, "EAP-FAST: Add PAC TLV (ack)");
ack = (eap_tlv_pac_ack_tlv *)wpabuf_put(buf, 0xAu);
ack->tlv_type = _bswap_16_4(0x800Bu);
ack->length = _bswap_16_4(6u);
ack->pac_ty... | static struct wpabuf *eap_fast_tlv_pac_ack(void) {
struct wpabuf *buf;
struct eap_tlv_result_tlv *res;
struct eap_tlv_pac_ack_tlv *ack;
buf = wpabuf_alloc(sizeof(*res) + sizeof(*ack));
if (buf == NULL)
return NULL;
wpa_printf(MSG_DEBUG, "EAP-FAST: Add PAC TLV (ack)");
ack = wpabuf_put(buf, sizeof(*a... | eap_fast_tlv_pac_ack | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_fast_tlv_result(int status, int intermediate) {
const char *v3;
__uint16_t v4;
wpabuf *buf;
eap_tlv_intermediate_result_tlv *result;
buf = wpabuf_alloc(6u);
if (!buf)
return 0;
if (intermediate)
v3 = "Intermediate ";
else
v3 = (const char *)&unk_264E7E;
wpa_printf(2, "EAP-FAST... | static struct wpabuf *eap_fast_tlv_result(int status, int intermediate) {
struct wpabuf *buf;
struct eap_tlv_intermediate_result_tlv *result;
buf = wpabuf_alloc(sizeof(*result));
if (buf == NULL)
return NULL;
wpa_printf(MSG_DEBUG, "EAP-FAST: Add %sResult TLV(status=%d)",
intermediate ? "Inter... | eap_fast_tlv_result | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_use_pac_opaque(eap_sm *sm, eap_fast_data *data,
eap_fast_pac *pac) {
size_t olen;
u8 *tlv;
olen = pac->pac_opaque_len;
tlv = (u8 *)malloc(olen + 4);
if (tlv &&
(*(_WORD *)tlv = _bswap_16_4(2u), *((_WORD *)tlv + 1) = _bswap_16_4(olen),
memcpy(tlv + 4, pac-... | static int eap_fast_use_pac_opaque(struct eap_sm *sm,
struct eap_fast_data *data,
struct eap_fast_pac *pac) {
u8 *tlv;
size_t tlv_len, olen;
struct eap_tlv_hdr *ehdr;
olen = pac->pac_opaque_len;
tlv_len = sizeof(*ehdr) + olen;
tlv = os_m... | eap_fast_use_pac_opaque | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_validate_crypto_binding(eap_tlv_crypto_binding_tlv *_bind) {
wpa_printf(
2,
"EAP-FAST: Crypto-Binding TLV: Version %d Received Version %d SubType %d",
_bind->version, _bind->received_version, _bind->subtype);
wpa_hexdump(1, "EAP-FAST: NONCE", _bind->nonce, 0x20u);
wpa_hexdump(1, "EA... | static int
eap_fast_validate_crypto_binding(struct eap_tlv_crypto_binding_tlv *_bind) {
wpa_printf(MSG_DEBUG,
"EAP-FAST: Crypto-Binding TLV: Version %d "
"Received Version %d SubType %d",
_bind->version, _bind->received_version, _bind->subtype);
wpa_hexdump(MSG_MSGDUMP, "EAP-F... | eap_fast_validate_crypto_binding | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_write(char **buf, char **pos, size_t *buf_len, const char *field,
const u8 *data, size_t len, int txt) {
int ret;
int reta;
int retb;
int retc;
int retd;
size_t i;
size_t need;
char *nbuf;
char *end;
if (data && buf && *buf && pos && *pos && *pos >= *buf) {
nee... | static void eap_fast_write(char **buf, char **pos, size_t *buf_len,
const char *field, const u8 *data, size_t len,
int txt) {
size_t i, need;
int ret;
char *end;
if (data == NULL || buf == NULL || *buf == NULL || pos == NULL ||
*pos == NULL || *pos < ... | eap_fast_write | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_fast_write_crypto_binding(eap_tlv_crypto_binding_tlv *rbind,
eap_tlv_crypto_binding_tlv *_bind,
const u8 *cmk) {
rbind->tlv_type = _bswap_16_4(0x800Cu);
rbind->length = _bswap_16_4(0x38u);
rbind->version = 1;
rbind->received_version ... | static void
eap_fast_write_crypto_binding(struct eap_tlv_crypto_binding_tlv *rbind,
struct eap_tlv_crypto_binding_tlv *_bind,
const u8 *cmk) {
rbind->tlv_type =
host_to_be16(EAP_TLV_TYPE_MANDATORY | EAP_TLV_CRYPTO_BINDING_TLV);
rbind->length = host_t... | eap_fast_write_crypto_binding | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_fast_write_pac(eap_sm *sm, const char *pac_file, char *buf,
size_t len) {
FILE *f;
wpa_config_blob *blob;
if (!strncmp(pac_file, "blob://", 7u)) {
blob = (wpa_config_blob *)os_zalloc(0x20u);
if (!blob)
return -1;
blob->data = (u8 *)buf;
blob->len = len;
bl... | static int eap_fast_write_pac(struct eap_sm *sm, const char *pac_file,
char *buf, size_t len) {
if (os_strncmp(pac_file, "blob://", 7) == 0) {
struct wpa_config_blob *blob;
blob = os_zalloc(sizeof(*blob));
if (blob == NULL)
return -1;
blob->data = (u8 *)buf;
blo... | eap_fast_write_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_fast_write_pac_request(u8 *pos, u16 pac_type) {
*(_WORD *)pos = _bswap_16_4(0x13u);
*((_WORD *)pos + 1) = _bswap_16_4(2u);
*((_WORD *)pos + 2) = _bswap_16_4(1u);
*((_WORD *)pos + 3) = _bswap_16_4(0xBu);
*((_WORD *)pos + 4) = _bswap_16_4(6u);
*((_WORD *)pos + 5) = _bswap_16_4(0xAu);
*((_WORD *)pos ... | static u8 *eap_fast_write_pac_request(u8 *pos, u16 pac_type) {
struct eap_tlv_hdr *pac;
struct eap_tlv_request_action_tlv *act;
struct eap_tlv_pac_type_tlv *type;
act = (struct eap_tlv_request_action_tlv *)pos;
act->tlv_type = host_to_be16(EAP_TLV_REQUEST_ACTION_TLV);
act->length = host_to_be16(2);
act->... | eap_fast_write_pac_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_peer_config *eap_get_config(eap_sm *sm) {
return sm->eapol_cb->get_config(sm->eapol_ctx);
} | struct eap_peer_config *eap_get_config(struct eap_sm *sm) {
return sm->eapol_cb->get_config(sm->eapol_ctx);
} | eap_get_config | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const wpa_config_blob *eap_get_config_blob(eap_sm *sm, const char *name) {
return sm->eapol_cb->get_config_blob(sm->eapol_ctx, name);
} | const struct wpa_config_blob *eap_get_config_blob(struct eap_sm *sm,
const char *name) {
#ifndef CONFIG_NO_CONFIG_BLOBS
return sm->eapol_cb->get_config_blob(sm->eapol_ctx, name);
#else
return NULL;
#endif
} | eap_get_config_blob | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_get_config_fragment_size(eap_sm *sm) {
eap_peer_config *config;
config = eap_get_config(sm);
if (config)
return config->fragment_size;
else
return -1;
} | int eap_get_config_fragment_size(struct eap_sm *sm) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return -1;
return config->fragment_size;
} | eap_get_config_fragment_size | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_config_identity(eap_sm *sm, size_t *len) {
eap_peer_config *config;
config = eap_get_config(sm);
if (!config)
return 0;
if ((*((_BYTE *)sm + 332) & 8) != 0) {
*len = config->machine_identity_len;
return config->machine_identity;
} else {
*len = config->identity_len;
retu... | const u8 *eap_get_config_identity(struct eap_sm *sm, size_t *len) {
struct eap_peer_config *config = eap_get_config(sm);
if (!config)
return NULL;
if (sm->use_machine_cred) {
*len = config->machine_identity_len;
return config->machine_identity;
}
*len = config->identity_len;
return config->id... | eap_get_config_identity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_config_new_password(eap_sm *sm, size_t *len) {
eap_peer_config *config;
config = eap_get_config(sm);
if (!config)
return 0;
*len = config->new_password_len;
return config->new_password;
} | const u8 *eap_get_config_new_password(struct eap_sm *sm, size_t *len) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return NULL;
*len = config->new_password_len;
return config->new_password;
} | eap_get_config_new_password | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_config_otp(eap_sm *sm, size_t *len) {
eap_peer_config *config;
config = eap_get_config(sm);
if (!config)
return 0;
*len = config->otp_len;
return config->otp;
} | const u8 *eap_get_config_otp(struct eap_sm *sm, size_t *len) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return NULL;
*len = config->otp_len;
return config->otp;
} | eap_get_config_otp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_config_password(eap_sm *sm, size_t *len) {
eap_peer_config *config;
config = eap_get_config(sm);
if (!config)
return 0;
if ((*((_BYTE *)sm + 332) & 8) != 0 && (config->flags & 8) != 0 ||
(*((_BYTE *)sm + 332) & 8) == 0 && (config->flags & 2) != 0) {
if (eap_get_ext_password(sm, ... | const u8 *eap_get_config_password(struct eap_sm *sm, size_t *len) {
struct eap_peer_config *config = eap_get_config(sm);
if (!config)
return NULL;
if ((sm->use_machine_cred &&
(config->flags & EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD)) ||
(!sm->use_machine_cred &&
(config->flags & EAP_CONFI... | eap_get_config_password | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_config_password2(eap_sm *sm, size_t *len, int *hash) {
eap_peer_config *config;
config = eap_get_config(sm);
if (!config)
return 0;
if ((*((_BYTE *)sm + 332) & 8) != 0 && (config->flags & 8) != 0 ||
(*((_BYTE *)sm + 332) & 8) == 0 && (config->flags & 2) != 0) {
if (eap_get_ext_p... | const u8 *eap_get_config_password2(struct eap_sm *sm, size_t *len, int *hash) {
struct eap_peer_config *config = eap_get_config(sm);
if (!config)
return NULL;
if ((sm->use_machine_cred &&
(config->flags & EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD)) ||
(!sm->use_machine_cred &&
(config->flags... | eap_get_config_password2 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_config_phase1(eap_sm *sm) {
eap_peer_config *config;
config = eap_get_config(sm);
if (config)
return config->phase1;
else
return 0;
} | const char *eap_get_config_phase1(struct eap_sm *sm) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return NULL;
return config->phase1;
} | eap_get_config_phase1 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_config_phase2(eap_sm *sm) {
eap_peer_config *config;
config = eap_get_config(sm);
if (config)
return config->phase2;
else
return 0;
} | const char *eap_get_config_phase2(struct eap_sm *sm) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return NULL;
return config->phase2;
} | eap_get_config_phase2 | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_eapKeyData(eap_sm *sm, size_t *len) {
if (sm && sm->eapKeyData) {
*len = sm->eapKeyDataLen;
return sm->eapKeyData;
} else {
*len = 0;
return 0;
}
} | const u8 *eap_get_eapKeyData(struct eap_sm *sm, size_t *len) {
if (sm == NULL || sm->eapKeyData == NULL) {
*len = 0;
return NULL;
}
*len = sm->eapKeyDataLen;
return sm->eapKeyData;
} | eap_get_eapKeyData | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_get_eapRespData(eap_sm *sm) {
wpabuf *resp;
if (!sm || !sm->eapRespData)
return 0;
resp = sm->eapRespData;
sm->eapRespData = 0;
return resp;
} | struct wpabuf *eap_get_eapRespData(struct eap_sm *sm) {
struct wpabuf *resp;
if (sm == NULL || sm->eapRespData == NULL)
return NULL;
resp = sm->eapRespData;
sm->eapRespData = NULL;
return resp;
} | eap_get_eapRespData | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_eapSessionId(eap_sm *sm, size_t *len) {
if (sm && sm->eapSessionId) {
*len = sm->eapSessionIdLen;
return sm->eapSessionId;
} else {
*len = 0;
return 0;
}
} | const u8 *eap_get_eapSessionId(struct eap_sm *sm, size_t *len) {
if (sm == NULL || sm->eapSessionId == NULL) {
*len = 0;
return NULL;
}
*len = sm->eapSessionIdLen;
return sm->eapSessionId;
} | eap_get_eapSessionId | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_erp_domain(eap_sm *sm) {
if (*((_QWORD *)sm->ssl_ctx2 + 4))
return (*((const char *(**)(void *))sm->ssl_ctx2 + 4))(sm->ssl_ctx);
else
return 0;
} | static const char *eap_get_erp_domain(struct eap_sm *sm) {
if (sm->eapol_cb->get_erp_domain)
return sm->eapol_cb->get_erp_domain(sm->eapol_ctx);
return NULL;
} | eap_get_erp_domain | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_get_erp_send_reauth_start(eap_sm *sm) {
if (*((_QWORD *)sm->ssl_ctx2 + 3))
return (*((int (**)(void *))sm->ssl_ctx2 + 3))(sm->ssl_ctx);
else
return 0;
} | static int eap_get_erp_send_reauth_start(struct eap_sm *sm) {
if (sm->eapol_cb->get_erp_send_reauth_start)
return sm->eapol_cb->get_erp_send_reauth_start(sm->eapol_ctx);
return 0;
} | eap_get_erp_send_reauth_start | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_get_ext_password(eap_sm *sm, eap_peer_config *config) {
u8 *password;
size_t password_len;
char *name;
if ((*((_BYTE *)sm + 332) & 8) != 0) {
password = config->machine_password;
password_len = config->machine_password_len;
} else {
password = config->password;
password_len = config->... | static int eap_get_ext_password(struct eap_sm *sm,
struct eap_peer_config *config) {
char *name;
const u8 *password;
size_t password_len;
if (sm->use_machine_cred) {
password = config->machine_password;
password_len = config->machine_password_len;
} else {
password... | eap_get_ext_password | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 eap_get_id(const wpabuf *msg) {
if (wpabuf_len_70(msg) > 3)
return *((_BYTE *)wpabuf_head_72(msg) + 1);
else
return 0;
} | u8 eap_get_id(const struct wpabuf *msg) {
const struct eap_hdr *eap;
if (wpabuf_len(msg) < sizeof(*eap))
return 0;
eap = wpabuf_head(msg);
return eap->identifier;
} | eap_get_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const u8 *eap_get_identity(eap_sm *sm, size_t *len) {
*len = (size_t)sm->auth_challenge;
return sm->peer_challenge;
} | const u8 *eap_get_identity(struct eap_sm *sm, size_t *len) {
*len = sm->identity_len;
return sm->identity;
} | eap_get_identity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_imsi(eap_sm *sm) {
if (sm && LOBYTE(sm->force_disabled))
return (const char *)&sm->force_disabled;
else
return 0;
} | const char *eap_get_imsi(struct eap_sm *sm) {
if (!sm || sm->imsi[0] == '\0')
return NULL;
return sm->imsi;
} | eap_get_imsi | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_eapol_interface *eap_get_interface(eap_sm *sm) {
return (eap_eapol_interface *)&sm->methodState;
} | struct eap_eapol_interface *eap_get_interface(struct eap_sm *sm) {
return &sm->eap_if;
} | eap_get_interface | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_method(eap_sm *sm) {
if (sm && sm->msg_ctx)
return (const char *)*((_QWORD *)sm->msg_ctx + 1);
else
return 0;
} | const char *eap_get_method(struct eap_sm *sm) {
if (!sm || !sm->m)
return NULL;
return sm->m->name;
} | eap_get_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_name(int vendor, eap_type type) {
eap_method_0 *m;
if (!vendor && type == eap_type_EAP_TYPE_EXPANDED)
return "expanded";
for (m = eap_methods; m; m = (eap_method_0 *)m->next) {
if (vendor == m->vendor && type == m->method)
return m->name;
}
return 0;
} | const char *eap_get_name(int vendor, enum eap_type type) {
struct eap_method *m;
if (vendor == EAP_VENDOR_IETF && type == EAP_TYPE_EXPANDED)
return "expanded";
for (m = eap_methods; m; m = m->next) {
if (m->vendor == vendor && m->method == type)
return m->name;
}
return NULL;
} | eap_get_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
size_t eap_get_names(char *buf, size_t buflen) {
const char *v3;
int ret;
char *pos;
eap_method_0 *m;
char *end;
if (!buflen)
return 0;
pos = buf;
end = &buf[buflen];
for (m = eap_methods; m; m = (eap_method_0 *)m->next) {
v3 = m == eap_methods ? (const char *)&unk_270795 : " ";
ret = snp... | size_t eap_get_names(char *buf, size_t buflen) {
char *pos, *end;
struct eap_method *m;
int ret;
if (buflen == 0)
return 0;
pos = buf;
end = pos + buflen;
for (m = eap_methods; m; m = m->next) {
ret = os_snprintf(pos, end - pos, "%s%s", m == eap_methods ? "" : " ",
m->name... | eap_get_names | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
char **eap_get_names_as_string_array(size_t *num) {
int v2;
int i;
int j;
eap_method_0 *m;
eap_method_0 *ma;
size_t array_len;
char **array;
array_len = 0;
i = 0;
for (m = eap_methods; m; m = (eap_method_0 *)m->next)
++array_len;
array = (char **)os_calloc_5(array_len + 1, 8u);
if (!array)
... | char **eap_get_names_as_string_array(size_t *num) {
struct eap_method *m;
size_t array_len = 0;
char **array;
int i = 0, j;
for (m = eap_methods; m; m = m->next)
array_len++;
array = os_calloc(array_len + 1, sizeof(char *));
if (array == NULL)
return NULL;
for (m = eap_methods; m; m = m->next... | eap_get_names_as_string_array | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u32 eap_get_phase2_type(const char *name, int *vendor) {
int v;
u32 type;
unsigned long v5;
v5 = __readfsqword(0x28u);
type = eap_peer_get_type(name, &v);
if (eap_allowed_phase2_type(v, type)) {
*vendor = v;
return type;
} else {
*vendor = 0;
return 0;
}
} | u32 eap_get_phase2_type(const char *name, int *vendor) {
int v;
u32 type = eap_peer_get_type(name, &v);
if (eap_allowed_phase2_type(v, type)) {
*vendor = v;
return type;
}
*vendor = EAP_VENDOR_IETF;
return EAP_TYPE_NONE;
} | eap_get_phase2_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_method_type *eap_get_phase2_types(eap_peer_config *config, size_t *count) {
int vendor;
eap_type method;
size_t mcount;
const eap_method_0 *m;
const eap_method_0 *methods;
eap_method_type *buf;
unsigned long v9;
v9 = __readfsqword(0x28u);
methods = eap_peer_get_methods(&mcount);
if (!methods)
... | struct eap_method_type *eap_get_phase2_types(struct eap_peer_config *config,
size_t *count) {
struct eap_method_type *buf;
u32 method;
int vendor;
size_t mcount;
const struct eap_method *methods, *m;
methods = eap_peer_get_methods(&mcount);
if (methods == NULL... | eap_get_phase2_types | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_get_serial_num(eap_sm *sm) {
return *(const char **)&sm->num_rounds;
} | const char *eap_get_serial_num(struct eap_sm *sm) { return sm->serial_num; } | eap_get_serial_num | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_type eap_get_type(const wpabuf *msg) {
if (wpabuf_len_70(msg) > 4)
return *((unsigned char *)wpabuf_head_72(msg) + 4);
else
return eap_type_EAP_TYPE_NONE;
} | enum eap_type eap_get_type(const struct wpabuf *msg) {
if (wpabuf_len(msg) < sizeof(struct eap_hdr) + 1)
return EAP_TYPE_NONE;
return ((const u8 *)wpabuf_head(msg))[sizeof(struct eap_hdr)];
} | eap_get_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_gpsk_deinit(eap_sm *sm, void *priv) {
free(*((void **)priv + 54));
free(*((void **)priv + 52));
if (*((_QWORD *)priv + 57)) {
memset(*((void **)priv + 57), 0, *((_QWORD *)priv + 58));
free(*((void **)priv + 57));
}
bin_clear_free(priv, 0x1E0u);
} | static void eap_gpsk_deinit(struct eap_sm *sm, void *priv) {
struct eap_gpsk_data *data = priv;
os_free(data->id_server);
os_free(data->id_peer);
if (data->psk) {
os_memset(data->psk, 0, data->psk_len);
os_free(data->psk);
}
bin_clear_free(data, sizeof(*data));
} | eap_gpsk_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_gpsk_derive_keys_helper(u32 csuite_specifier, u8 *kdf_out,
size_t kdf_out_len, const u8 *psk,
size_t psk_len, const u8 *seed, size_t seed_len,
u8 *msk, u8 *emsk, u8 *sk, size_t sk_len,
... | static int eap_gpsk_derive_keys_helper(u32 csuite_specifier, u8 *kdf_out,
size_t kdf_out_len, const u8 *psk,
size_t psk_len, const u8 *seed,
size_t seed_len, u8 *msk, u8 *emsk,
... | eap_gpsk_derive_keys_helper | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_gpsk_derive_mid_helper(u32 csuite_specifier, u8 *kdf_out,
size_t kdf_out_len, const u8 *psk,
const u8 *seed, size_t seed_len,
u8 method_type) {
int (*gkdf)(const u8 *, const u8 *, size_t, u8 *, size_t);
size_t data_... | static int eap_gpsk_derive_mid_helper(u32 csuite_specifier, u8 *kdf_out,
size_t kdf_out_len, const u8 *psk,
const u8 *seed, size_t seed_len,
u8 method_type) {
u8 *pos, *data;
size_t data_len;
int (*gk... | eap_gpsk_derive_mid_helper | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_gpsk_gkdf_cmac(const u8 *psk, const u8 *data, size_t data_len, u8 *buf,
size_t len) {
size_t v6;
size_t i;
size_t left;
size_t n;
size_t clen;
const u8 *addr[2];
size_t vlen[3];
u8 ibuf[2];
u8 hash[24];
unsigned long v16;
v16 = __readfsqword(0x28u);
addr[0] = ibuf... | static int eap_gpsk_gkdf_cmac(const u8 *psk, const u8 *data, size_t data_len,
u8 *buf, size_t len) {
u8 *opos;
size_t i, n, hashlen, left, clen;
u8 ibuf[2], hash[16];
const u8 *addr[2];
size_t vlen[2];
hashlen = sizeof(hash);
addr[0] = ibuf;
vlen[0] = sizeof(ibuf);
addr... | eap_gpsk_gkdf_cmac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_gpsk_gkdf_sha256(const u8 *psk, const u8 *data, size_t data_len,
u8 *buf, size_t len) {
size_t v6;
size_t i;
size_t left;
size_t n;
size_t clen;
const u8 *addr[2];
size_t vlen[3];
u8 ibuf[2];
u8 hash[40];
unsigned long v16;
v16 = __readfsqword(0x28u);
addr[0] = ... | static int eap_gpsk_gkdf_sha256(const u8 *psk, const u8 *data, size_t data_len,
u8 *buf, size_t len) {
u8 *opos;
size_t i, n, hashlen, left, clen;
u8 ibuf[2], hash[SHA256_MAC_LEN];
const u8 *addr[2];
size_t vlen[2];
hashlen = SHA256_MAC_LEN;
addr[0] = ibuf;
vlen[0] = si... | eap_gpsk_gkdf_sha256 | 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.