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 |
|---|---|---|---|---|---|---|---|
const char *eap_server_get_name(int vendor, eap_type type) {
eap_method *m;
if (!vendor && type == eap_type_EAP_TYPE_EXPANDED)
return "expanded";
for (m = eap_methods_0; m; m = m->next) {
if (vendor == m->vendor && type == m->method)
return m->name;
}
return "unknown";
} | const char *eap_server_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 "unknown";
} | eap_server_get_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_type eap_server_get_type(const char *name, int *vendor) {
eap_method *m;
for (m = eap_methods_0; m; m = m->next) {
if (!strcmp(m->name, name)) {
*vendor = m->vendor;
return m->method;
}
}
*vendor = 0;
return eap_type_EAP_TYPE_NONE;
} | enum eap_type eap_server_get_type(const char *name, int *vendor) {
struct eap_method *m;
for (m = eap_methods; m; m = m->next) {
if (os_strcmp(m->name, name) == 0) {
*vendor = m->vendor;
return m->method;
}
}
*vendor = EAP_VENDOR_IETF;
return EAP_TYPE_NONE;
} | eap_server_get_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_server_method_register(eap_method *method) {
eap_method *m;
eap_method *last;
last = 0;
if (method && method->name && method->version == 1) {
for (m = eap_methods_0; m; m = m->next) {
if (m->vendor == method->vendor && m->method == method->method ||
!strcmp(m->name, method->name)) {... | int eap_server_method_register(struct eap_method *method) {
struct eap_method *m, *last = NULL;
if (method == NULL || method->name == NULL ||
method->version != EAP_SERVER_METHOD_INTERFACE_VERSION) {
eap_server_method_free(method);
return -1;
}
for (m = eap_methods; m; m = m->next) {
if ((m-... | eap_server_method_register | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_server_sm_deinit(eap_sm *sm) {
if (sm) {
wpa_printf(2, "EAP: Server state machine removed");
if (sm->msg_ctx) {
if (*(_QWORD *)&sm->workaround)
(*((void (**)(eap_sm *, _QWORD))sm->msg_ctx + 4))(
sm, *(_QWORD *)&sm->workaround);
}
wpabuf_free(*(wpabuf **)&sm->allowNot... | void eap_server_sm_deinit(struct eap_sm *sm) {
if (sm == NULL)
return;
wpa_printf(MSG_DEBUG, "EAP: Server state machine removed");
if (sm->m && sm->eap_method_priv)
sm->m->reset(sm, sm->eap_method_priv);
wpabuf_free(sm->eap_if.eapReqData);
bin_clear_free(sm->eap_if.eapKeyData, sm->eap_if.eapKeyDataLen... | eap_server_sm_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_sm *eap_server_sm_init(void *eapol_ctx, const eapol_callbacks_0 *eapol_cb,
const eap_config *conf,
const eap_session_data *sess) {
eap_sm *sm;
sm = (eap_sm *)os_zalloc(0x238u);
if (!sm)
return 0;
sm->ssl_ctx = eapol_ctx;
sm->ssl_ctx2 = (void *)eap... | struct eap_sm *eap_server_sm_init(void *eapol_ctx,
const struct eapol_callbacks *eapol_cb,
const struct eap_config *conf,
const struct eap_session_data *sess) {
struct eap_sm *sm;
sm = os_zalloc(sizeof(*sm));
if... | eap_server_sm_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_server_sm_step(eap_sm *sm) {
int res;
for (res = 0;; res = 1) {
LOBYTE(sm->scard_ctx) = 0;
sm_EAP_Step_0(sm);
if (!LOBYTE(sm->scard_ctx))
break;
}
return res;
} | int eap_server_sm_step(struct eap_sm *sm) {
int res = 0;
do {
sm->changed = false;
SM_STEP_RUN(EAP);
if (sm->changed)
res = 1;
} while (sm->changed);
return res;
} | eap_server_sm_step | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_server_unregister_methods() {
eap_method *m;
while (eap_methods_0) {
m = eap_methods_0;
eap_methods_0 = eap_methods_0->next;
if (m->free)
m->free(m);
else
eap_server_method_free(m);
}
} | void eap_server_unregister_methods(void) {
struct eap_method *m;
while (eap_methods) {
m = eap_methods;
eap_methods = eap_methods->next;
if (m->free)
m->free(m);
else
eap_server_method_free(m);
}
} | eap_server_unregister_methods | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_anon_id(eap_sm *sm, const u8 *id, size_t len) {
if (sm->eapol_cb->set_anon_id)
sm->eapol_cb->set_anon_id(sm->eapol_ctx, id, len);
} | void eap_set_anon_id(struct eap_sm *sm, const u8 *id, size_t len) {
if (sm->eapol_cb->set_anon_id)
sm->eapol_cb->set_anon_id(sm->eapol_ctx, id, len);
} | eap_set_anon_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_config_blob(eap_sm *sm, wpa_config_blob *blob) {
sm->eapol_cb->set_config_blob(sm->eapol_ctx, blob);
} | void eap_set_config_blob(struct eap_sm *sm, struct wpa_config_blob *blob) {
#ifndef CONFIG_NO_CONFIG_BLOBS
sm->eapol_cb->set_config_blob(sm->eapol_ctx, blob);
#endif
} | eap_set_config_blob | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_external_sim(eap_sm *sm, int external_sim) {
sm->external_sim = external_sim;
} | void eap_set_external_sim(struct eap_sm *sm, int external_sim) {
sm->external_sim = external_sim;
} | eap_set_external_sim | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_fast_reauth(eap_sm *sm, int enabled) { sm->fast_reauth = enabled; } | void eap_set_fast_reauth(struct eap_sm *sm, int enabled) {
sm->fast_reauth = enabled;
} | eap_set_fast_reauth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_force_disabled(eap_sm *sm, int disabled) {
sm->force_disabled = disabled;
} | void eap_set_force_disabled(struct eap_sm *sm, int disabled) {
sm->force_disabled = disabled;
} | eap_set_force_disabled | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_set_workaround(eap_sm *sm, unsigned int workaround) {
sm->workaround = workaround;
} | void eap_set_workaround(struct eap_sm *sm, unsigned int workaround) {
sm->workaround = workaround;
} | eap_set_workaround | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_Policy_getDecision(eap_sm *sm) {
_BOOL4 id_req;
if (!*(_DWORD *)(*(_QWORD *)&sm->external_sim + 28LL) && sm->peer_challenge &&
sm[1].last_sha1[9] != 1) {
wpa_printf(2, "EAP: getDecision: -> PASSTHROUGH");
return 3;
}
if (sm->msg_ctx && *(_DWORD *)&sm->reauthInit != 1 &&
(*((unsig... | static int eap_sm_Policy_getDecision(struct eap_sm *sm) {
if (!sm->cfg->eap_server && sm->identity && !sm->start_reauth) {
wpa_printf(MSG_DEBUG, "EAP: getDecision: -> PASSTHROUGH");
return DECISION_PASSTHROUGH;
}
if (sm->m && sm->currentMethod != EAP_TYPE_IDENTITY &&
sm->m->isSuccess(sm, sm->eap_me... | eap_sm_Policy_getDecision | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_type eap_sm_Policy_getNextMethod(eap_sm *sm, int *vendor) {
eap_type next;
int idx;
idx = (int)sm->ext_pw_buf;
if (sm->peer_challenge && sm->erp_seq != -1) {
if (sm->ext_pw && idx <= 7 &&
(*((_DWORD *)sm->ext_pw + 2 * idx) ||
*((_DWORD *)sm->ext_pw + 2 * idx + 1))) {
*vendor = *(... | static enum eap_type eap_sm_Policy_getNextMethod(struct eap_sm *sm,
int *vendor) {
enum eap_type next;
int idx = sm->user_eap_method_index;
if (sm->identity == NULL || sm->currentId == -1) {
*vendor = EAP_VENDOR_IETF;
next = EAP_TYPE_IDENTITY;
sm->upda... | eap_sm_Policy_getNextMethod | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_Policy_update(eap_sm *sm, const u8 *nak_list, size_t len) {
if (nak_list && sm && sm->ext_pw) {
if (*((_DWORD *)sm->ext_pw + 26)) {
wpa_printf(
2,
"EAP: EAP-Nak received after Phase2 user info was selected - reject");
*(_DWORD *)&sm->last_sha1[21] = 1;
} else {
... | static void eap_sm_Policy_update(struct eap_sm *sm, const u8 *nak_list,
size_t len) {
if (nak_list == NULL || sm == NULL || sm->user == NULL)
return;
if (sm->user->phase2) {
wpa_printf(MSG_DEBUG, "EAP: EAP-Nak received after Phase2 user"
" info was... | eap_sm_Policy_update | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_abort(eap_sm *sm) {
wpabuf_free(sm->lastRespData);
sm->lastRespData = 0;
wpabuf_free(sm->eapRespData);
sm->eapRespData = 0;
eap_sm_free_key(sm);
free(sm->eapSessionId);
sm->eapSessionId = 0;
eapol_set_bool(sm, eapol_bool_var_EAPOL_eapSuccess, 0);
} | void eap_sm_abort(struct eap_sm *sm) {
wpabuf_free(sm->lastRespData);
sm->lastRespData = NULL;
wpabuf_free(sm->eapRespData);
sm->eapRespData = NULL;
eap_sm_free_key(sm);
os_free(sm->eapSessionId);
sm->eapSessionId = NULL;
eapol_set_bool(sm, EAPOL_eapSuccess, false);
} | eap_sm_abort | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool eap_sm_allowMethod(eap_sm *sm, int vendor, eap_type method) {
if (eap_allowed_method(sm, vendor, method)) {
if (eap_peer_get_eap_method(vendor, method)) {
return 1;
} else {
wpa_printf(2, "EAP: not included in build: vendor %u method %u", vendor,
method);
return 0;
... | static bool eap_sm_allowMethod(struct eap_sm *sm, int vendor,
enum eap_type method) {
if (!eap_allowed_method(sm, vendor, method)) {
wpa_printf(MSG_DEBUG,
"EAP: configuration does not allow: "
"vendor %u method %u",
vendor, method);
r... | eap_sm_allowMethod | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildFailure(eap_sm *sm, u8 id) {
wpabuf *msg;
eap_hdr *resp;
wpa_printf(2, "EAP: Building EAP-Failure (id=%d)", id);
msg = wpabuf_alloc(4u);
if (!msg)
return 0;
resp = (eap_hdr *)wpabuf_put(msg, 4u);
resp->code = 4;
resp->identifier = id;
resp->length = _bswap_16_14(4u);
return ... | static struct wpabuf *eap_sm_buildFailure(struct eap_sm *sm, u8 id) {
struct wpabuf *msg;
struct eap_hdr *resp;
wpa_printf(MSG_DEBUG, "EAP: Building EAP-Failure (id=%d)", id);
msg = wpabuf_alloc(sizeof(*resp));
if (msg == NULL)
return NULL;
resp = wpabuf_put(msg, sizeof(*resp));
resp->code = EAP_CODE... | eap_sm_buildFailure | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildIdentity(eap_sm *sm, int id, int encrypted) {
size_t identity_len;
const u8 *identity;
eap_peer_config *config;
wpabuf *resp;
unsigned long v9;
v9 = __readfsqword(0x28u);
config = eap_get_config(sm);
if (config) {
if (sm->m && sm->m->isSuccess &&
(identity = (const u8 *)... | struct wpabuf *eap_sm_buildIdentity(struct eap_sm *sm, int id, int encrypted) {
struct eap_peer_config *config = eap_get_config(sm);
struct wpabuf *resp;
const u8 *identity;
size_t identity_len;
if (config == NULL) {
wpa_printf(MSG_WARNING, "EAP: buildIdentity: configuration "
... | eap_sm_buildIdentity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildInitiateReauthStart(eap_sm *sm, u8 id) {
size_t plen;
size_t domain_len;
const char *domain;
wpabuf *msg;
plen = 1;
domain_len = 0;
domain = eap_get_erp_domain(sm);
if (domain) {
domain_len = strlen(domain);
plen = domain_len + 3;
}
msg = eap_msg_alloc(0, eap_type_EAP_TY... | static struct wpabuf *eap_sm_buildInitiateReauthStart(struct eap_sm *sm,
u8 id) {
const char *domain;
size_t plen = 1;
struct wpabuf *msg;
size_t domain_len = 0;
domain = eap_get_erp_domain(sm);
if (domain) {
domain_len = os_strlen(domain);
plen... | eap_sm_buildInitiateReauthStart | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildNak(eap_sm *sm, int id) {
int found;
int expanded_found;
size_t count;
const eap_method_0 *m;
const eap_method_0 *methods;
wpabuf *resp;
u8 *start;
unsigned long v10;
v10 = __readfsqword(0x28u);
found = 0;
expanded_found = 0;
wpa_printf(2,
"EAP: Building EAP-Nak... | static struct wpabuf *eap_sm_buildNak(struct eap_sm *sm, int id) {
struct wpabuf *resp;
u8 *start;
int found = 0, expanded_found = 0;
size_t count;
const struct eap_method *methods, *m;
wpa_printf(MSG_DEBUG,
"EAP: Building EAP-Nak (requested type %u "
"vendor=%u method=%u not allo... | eap_sm_buildNak | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildNotify(int id) {
wpa_printf(2, "EAP: Generating EAP-Response Notification");
return eap_msg_alloc(0, eap_type_EAP_TYPE_NOTIFICATION, 0, 2u, id);
} | static struct wpabuf *eap_sm_buildNotify(int id) {
wpa_printf(MSG_DEBUG, "EAP: Generating EAP-Response Notification");
return eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, 0,
EAP_CODE_RESPONSE, id);
} | eap_sm_buildNotify | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_buildSuccess(eap_sm *sm, u8 id) {
wpabuf *msg;
eap_hdr *resp;
wpa_printf(2, "EAP: Building EAP-Success (id=%d)", id);
msg = wpabuf_alloc(4u);
if (!msg)
return 0;
resp = (eap_hdr *)wpabuf_put(msg, 4u);
resp->code = 3;
resp->identifier = id;
resp->length = _bswap_16_14(4u);
return ... | static struct wpabuf *eap_sm_buildSuccess(struct eap_sm *sm, u8 id) {
struct wpabuf *msg;
struct eap_hdr *resp;
wpa_printf(MSG_DEBUG, "EAP: Building EAP-Success (id=%d)", id);
msg = wpabuf_alloc(sizeof(*resp));
if (msg == NULL)
return NULL;
resp = wpabuf_put(msg, sizeof(*resp));
resp->code = EAP_CODE... | eap_sm_buildSuccess | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_sm_build_expanded_nak(eap_sm *sm, int id,
const eap_method_0 *methods, size_t count) {
int found;
const eap_method_0 *m;
wpabuf *resp;
found = 0;
wpa_printf(2, "EAP: Building expanded EAP-Nak");
resp = eap_msg_alloc(0, eap_type_EAP_TYPE_EXPANDED, 8 * (count + 2... | static struct wpabuf *
eap_sm_build_expanded_nak(struct eap_sm *sm, int id,
const struct eap_method *methods, size_t count) {
struct wpabuf *resp;
int found = 0;
const struct eap_method *m;
wpa_printf(MSG_DEBUG, "EAP: Building expanded EAP-Nak");
resp = eap_msg_alloc(EAP_VENDOR_IET... | eap_sm_build_expanded_nak | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_calculateTimeout(eap_sm *sm, int retransCount, int eapSRTT,
int eapRTTVAR, int methodTimeout) {
int rto;
int i;
if (sm[1].last_sha1[17]) {
wpa_printf(
2, "EAP: retransmit timeout 1 second for EAP-Initiate-Re-auth-Start");
return 1;
} else if (methodTimeout... | static int eap_sm_calculateTimeout(struct eap_sm *sm, int retransCount,
int eapSRTT, int eapRTTVAR,
int methodTimeout) {
int rto, i;
if (sm->try_initiate_reauth) {
wpa_printf(
MSG_DEBUG,
"EAP: retransmit timeout 1 second for ... | eap_sm_calculateTimeout | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_sm_decision_txt(EapDecision decision) {
if (decision == DECISION_UNCOND_SUCC)
return "UNCOND_SUCC";
if ((unsigned int)decision > DECISION_UNCOND_SUCC)
return "UNKNOWN";
if (decision)
return "COND_SUCC";
return "FAIL";
} | static const char *eap_sm_decision_txt(EapDecision decision) {
switch (decision) {
case DECISION_FAIL:
return "FAIL";
case DECISION_COND_SUCC:
return "COND_SUCC";
case DECISION_UNCOND_SUCC:
return "UNCOND_SUCC";
default:
return "UNKNOWN";
}
} | eap_sm_decision_txt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_free_key(eap_sm *sm) {
if (sm->eapKeyData) {
bin_clear_free(sm->eapKeyData, sm->eapKeyDataLen);
sm->eapKeyData = 0;
}
} | static void eap_sm_free_key(struct eap_sm *sm) {
if (sm->eapKeyData) {
bin_clear_free(sm->eapKeyData, sm->eapKeyDataLen);
sm->eapKeyData = NULL;
}
} | eap_sm_free_key | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_getId(const wpabuf *data) {
const eap_hdr *hdr;
if (!data || wpabuf_len_50(data) <= 3)
return -1;
hdr = (const eap_hdr *)wpabuf_head_52(data);
wpa_printf(2, "EAP: getId: id=%d", hdr->identifier);
return hdr->identifier;
} | static int eap_sm_getId(const struct wpabuf *data) {
const struct eap_hdr *hdr;
if (data == NULL || wpabuf_len(data) < sizeof(*hdr))
return -1;
hdr = wpabuf_head(data);
wpa_printf(MSG_DEBUG, "EAP: getId: id=%d", hdr->identifier);
return hdr->identifier;
} | eap_sm_getId | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_sm_get_method_name(eap_sm *sm) {
if (sm->m)
return sm->m->name;
else
return "UNKNOWN";
} | const char *eap_sm_get_method_name(struct eap_sm *sm) {
if (sm->m == NULL)
return "UNKNOWN";
return sm->m->name;
} | eap_sm_get_method_name | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_get_status(eap_sm *sm, char *buf, size_t buflen, int verbose) {
const char *v5;
int v6;
int ClientTimeout;
const char *v8;
const char *v9;
int len;
int ret;
int reta;
const eap_method_0 *m;
if (!sm)
return 0;
v5 = eap_sm_state_txt(sm->EAP_state);
len = snprintf(buf, buflen, "EAP ... | int eap_sm_get_status(struct eap_sm *sm, char *buf, size_t buflen,
int verbose) {
int len, ret;
if (sm == NULL)
return 0;
len = os_snprintf(buf, buflen, "EAP state=%s\n",
eap_sm_state_txt(sm->EAP_state));
if (os_snprintf_error(buflen, len))
return 0;
if (sm... | eap_sm_get_status | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_method_pending(eap_sm *sm) { return sm && sm[1].erp_seq == 1; } | int eap_sm_method_pending(struct eap_sm *sm) {
if (sm == NULL)
return 0;
return sm->method_pending == METHOD_PENDING_WAIT;
} | eap_sm_method_pending | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_sm_method_state_txt(EapMethodState state) {
const char *result;
switch (state) {
case METHOD_NONE:
result = "NONE";
break;
case METHOD_INIT:
result = "INIT";
break;
case METHOD_CONT:
result = "CONT";
break;
case METHOD_MAY_CONT:
result = "MAY_CONT";
break;
... | static const char *eap_sm_method_state_txt(EapMethodState state) {
switch (state) {
case METHOD_NONE:
return "NONE";
case METHOD_INIT:
return "INIT";
case METHOD_CONT:
return "CONT";
case METHOD_MAY_CONT:
return "MAY_CONT";
case METHOD_DONE:
return "DONE";
default:
return "UNKNOWN"... | eap_sm_method_state_txt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_sm_nextId(eap_sm *sm, int id) {
int ida;
LOBYTE(ida) = id;
if (id >= 0)
return (unsigned char)(ida + 1);
ida = (unsigned char)rand();
if (ida == LODWORD(sm->last_config))
return (unsigned char)(ida + 1);
else
return ida;
} | static int eap_sm_nextId(struct eap_sm *sm, int id) {
if (id < 0) {
id = rand() & 0xff;
if (id != sm->lastId)
return id;
}
return (id + 1) & 0xff;
} | eap_sm_nextId | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_notify_cached(eap_sm *sm) {
if (sm)
sm->EAP_state = EAP_NOTIFICATION | EAP_GET_METHOD;
} | void eap_sm_notify_cached(struct eap_sm *sm) {
if (sm == NULL)
return;
sm->EAP_state = EAP_SUCCESS;
} | eap_sm_notify_cached | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_notify_ctrl_attached(eap_sm *sm) {
eap_peer_config *config;
config = eap_get_config(sm);
if (config) {
if (config->pending_req_identity)
eap_sm_request_identity(sm);
if (config->pending_req_password)
eap_sm_request_password(sm);
if (config->pending_req_new_password)
eap_... | void eap_sm_notify_ctrl_attached(struct eap_sm *sm) {
struct eap_peer_config *config = eap_get_config(sm);
if (config == NULL)
return;
if (config->pending_req_identity)
eap_sm_request_identity(sm);
if (config->pending_req_password)
eap_sm_request_password(sm);
if (config->pending_req_new_passwor... | eap_sm_notify_ctrl_attached | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_parseEapReq(eap_sm *sm, const wpabuf *req) {
size_t v2;
int error_code;
size_t plen;
const eap_hdr *hdr;
const u8 *pos;
const u8 *addr[1];
unsigned long v8;
v8 = __readfsqword(0x28u);
sm->rxFailure = 0;
sm->rxSuccess = sm->rxFailure;
sm->rxResp = sm->rxSuccess;
sm->rxReq = sm->rxRes... | static void eap_sm_parseEapReq(struct eap_sm *sm, const struct wpabuf *req) {
const struct eap_hdr *hdr;
size_t plen;
const u8 *pos;
sm->rxReq = sm->rxResp = sm->rxSuccess = sm->rxFailure = false;
sm->reqId = 0;
sm->reqMethod = EAP_TYPE_NONE;
sm->reqVendor = EAP_VENDOR_IETF;
sm->reqVendorMethod = EAP_T... | eap_sm_parseEapReq | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_parseEapResp(eap_sm *sm, const wpabuf *resp) {
size_t v2;
size_t v3;
const eap_hdr *hdr;
size_t plen;
sm->req_sha1[17] = 0;
sm->req_sha1[18] = 0;
*(_DWORD *)&sm->last_sha1[1] = -1;
*(_DWORD *)&sm->last_sha1[5] = 0;
*(_DWORD *)&sm->last_sha1[9] = 0;
*(_DWORD *)&sm->last_sha1[13] = 0;
i... | static void eap_sm_parseEapResp(struct eap_sm *sm, const struct wpabuf *resp) {
const struct eap_hdr *hdr;
size_t plen;
sm->rxResp = false;
sm->rxInitiate = false;
sm->respId = -1;
sm->respMethod = EAP_TYPE_NONE;
sm->respVendor = EAP_VENDOR_IETF;
sm->respVendorMethod = EAP_TYPE_NONE;
if (resp == NUL... | eap_sm_parseEapResp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_pending_cb(eap_sm *sm) {
if (sm) {
wpa_printf(2, "EAP: Callback for pending request received");
if (sm[1].erp_seq == 1)
sm[1].erp_seq = 2;
}
} | void eap_sm_pending_cb(struct eap_sm *sm) {
if (sm == NULL)
return;
wpa_printf(MSG_DEBUG, "EAP: Callback for pending request received");
if (sm->method_pending == METHOD_PENDING_WAIT)
sm->method_pending = METHOD_PENDING_CONT;
} | eap_sm_pending_cb | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_processIdentity(eap_sm *sm, const wpabuf *req) {
size_t msg_len;
const u8 *pos;
unsigned long v4;
v4 = __readfsqword(0x28u);
wpa_msg(sm->msg_ctx, 3, "CTRL-EVENT-EAP-STARTED EAP authentication started");
eap_notify_status(sm, "started", ¶meter);
pos = eap_hdr_validate(0, eap_type_EAP_TYPE_... | static void eap_sm_processIdentity(struct eap_sm *sm,
const struct wpabuf *req) {
const u8 *pos;
size_t msg_len;
wpa_msg(sm->msg_ctx, MSG_INFO,
WPA_EVENT_EAP_STARTED "EAP authentication started");
eap_notify_status(sm, "started", "");
pos = eap_hdr_validate(EAP_V... | eap_sm_processIdentity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_processNotify(eap_sm *sm, const wpabuf *req) {
char v2;
size_t msg_len;
size_t i;
const u8 *pos;
char *msg;
unsigned long v7;
v7 = __readfsqword(0x28u);
pos = eap_hdr_validate(0, eap_type_EAP_TYPE_NOTIFICATION, req, &msg_len);
if (pos) {
wpa_hexdump_ascii(2, "EAP: EAP-Request Notifica... | static void eap_sm_processNotify(struct eap_sm *sm, const struct wpabuf *req) {
const u8 *pos;
char *msg;
size_t i, msg_len;
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, req, &msg_len);
if (pos == NULL)
return;
wpa_hexdump_ascii(MSG_DEBUG, "EAP: EAP-Request Notification data", pos,
... | eap_sm_processNotify | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_process_nak(eap_sm *sm, const u8 *nak_list, size_t len) {
int i;
size_t j;
if (sm->ext_pw) {
wpa_printf(1, "EAP: processing NAK (current EAP method index %d)",
LODWORD(sm->ext_pw_buf));
wpa_hexdump(1, "EAP: configured methods", sm->ext_pw, 0x40u);
wpa_hexdump(1, "EAP: list ... | void eap_sm_process_nak(struct eap_sm *sm, const u8 *nak_list, size_t len) {
int i;
size_t j;
if (sm->user == NULL)
return;
wpa_printf(MSG_MSGDUMP,
"EAP: processing NAK (current EAP method "
"index %d)",
sm->user_eap_method_index);
wpa_hexdump(MSG_MSGDUMP, "EAP: c... | eap_sm_process_nak | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request(eap_sm *sm, wpa_ctrl_req_type field, const char *msg,
size_t msglen) {
eap_peer_config *v4;
const char *txt;
eap_peer_config *config;
char *tmp;
txt = 0;
if (sm) {
v4 = eap_get_config(sm);
config = v4;
if (v4) {
switch (field) {
case wpa_ctrl_... | static void eap_sm_request(struct eap_sm *sm, enum wpa_ctrl_req_type field,
const char *msg, size_t msglen) {
#if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
struct eap_peer_config *config;
const char *txt = NULL;
char *tmp;
if (sm == NULL)
return;
config = e... | eap_sm_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_identity(eap_sm *sm) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_IDENTITY, 0, 0);
} | void eap_sm_request_identity(struct eap_sm *sm) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_IDENTITY, NULL, 0);
} | eap_sm_request_identity | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_new_password(eap_sm *sm) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_NEW_PASSWORD, 0, 0);
} | void eap_sm_request_new_password(struct eap_sm *sm) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_NEW_PASSWORD, NULL, 0);
} | eap_sm_request_new_password | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_otp(eap_sm *sm, const char *msg, size_t msg_len) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_OTP, msg, msg_len);
} | void eap_sm_request_otp(struct eap_sm *sm, const char *msg, size_t msg_len) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_OTP, msg, msg_len);
} | eap_sm_request_otp | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_passphrase(eap_sm *sm) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_PASSPHRASE, 0, 0);
} | void eap_sm_request_passphrase(struct eap_sm *sm) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_PASSPHRASE, NULL, 0);
} | eap_sm_request_passphrase | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_password(eap_sm *sm) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_PASSWORD, 0, 0);
} | void eap_sm_request_password(struct eap_sm *sm) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_PASSWORD, NULL, 0);
} | eap_sm_request_password | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_pin(eap_sm *sm) {
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_EAP_PIN, 0, 0);
} | void eap_sm_request_pin(struct eap_sm *sm) {
eap_sm_request(sm, WPA_CTRL_REQ_EAP_PIN, NULL, 0);
} | eap_sm_request_pin | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_request_sim(eap_sm *sm, const char *req) {
size_t v2;
v2 = strlen(req);
eap_sm_request(sm, wpa_ctrl_req_type_WPA_CTRL_REQ_SIM, req, v2);
} | void eap_sm_request_sim(struct eap_sm *sm, const char *req) {
eap_sm_request(sm, WPA_CTRL_REQ_SIM, req, os_strlen(req));
} | eap_sm_request_sim | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_sm_set_ext_pw_ctx(eap_sm *sm, ext_password_data *ext) {
sm->ext_pw_buf = 0;
sm->ext_pw = ext;
} | void eap_sm_set_ext_pw_ctx(struct eap_sm *sm, struct ext_password_data *ext) {
ext_password_free(sm->ext_pw_buf);
sm->ext_pw_buf = NULL;
sm->ext_pw = ext;
} | eap_sm_set_ext_pw_ctx | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_sm_state_txt(int state) {
const char *result;
switch (state) {
case 0:
result = "INITIALIZE";
break;
case 1:
result = "DISABLED";
break;
case 2:
result = "IDLE";
break;
case 3:
result = "RECEIVED";
break;
case 4:
result = "GET_METHOD";
break;
case... | static const char *eap_sm_state_txt(int state) {
switch (state) {
case EAP_INITIALIZE:
return "INITIALIZE";
case EAP_DISABLED:
return "DISABLED";
case EAP_IDLE:
return "IDLE";
case EAP_RECEIVED:
return "RECEIVED";
case EAP_GET_METHOD:
return "GET_METHOD";
case EAP_METHOD:
return "M... | eap_sm_state_txt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_success_workaround(eap_sm *sm, int reqId, int lastId) {
if (sm->workaround && (reqId == (unsigned char)(lastId + 1) ||
reqId == (unsigned char)(lastId + 2))) {
wpa_printf(2,
"EAP: Workaround for unexpected identifier field in EAP "
"Success: reqId=%d ... | static int eap_success_workaround(struct eap_sm *sm, int reqId, int lastId) {
if (sm->workaround &&
(reqId == ((lastId + 1) & 0xff) || reqId == ((lastId + 2) & 0xff))) {
wpa_printf(MSG_DEBUG,
"EAP: Workaround for unexpected "
"identifier field in EAP Success: "
... | eap_success_workaround | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_teap_add_identity_type(eap_sm *sm, wpabuf *msg) {
teap_identity_types v2;
wpabuf *v3;
if ((*((_BYTE *)sm + 332) & 8) != 0)
v2 = teap_identity_types_TEAP_IDENTITY_TYPE_MACHINE;
else
v2 = teap_identity_types_TEAP_IDENTITY_TYPE_USER;
v3 = eap_teap_tlv_identity_type(v2);
return wpabuf_conca... | static struct wpabuf *eap_teap_add_identity_type(struct eap_sm *sm,
struct wpabuf *msg) {
struct wpabuf *tlv;
tlv = eap_teap_tlv_identity_type(sm->use_machine_cred
? TEAP_IDENTITY_TYPE_MACHINE
... | eap_teap_add_identity_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_add_pac(eap_teap_pac **pac_root, eap_teap_pac **pac_current,
eap_teap_pac *entry) {
eap_teap_pac *pac;
if (!entry || !entry->a_id)
return -1;
eap_teap_remove_pac(pac_root, pac_current, entry->a_id, entry->a_id_len,
entry->pac_type);
pac = (eap_teap_pa... | int eap_teap_add_pac(struct eap_teap_pac **pac_root,
struct eap_teap_pac **pac_current,
struct eap_teap_pac *entry) {
struct eap_teap_pac *pac;
if (!entry || !entry->a_id)
return -1;
eap_teap_remove_pac(pac_root, pac_current, entry->a_id, entry->a_id_len,
... | eap_teap_add_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_add_pac_data(eap_teap_pac *pac, char **buf, char **pos,
size_t *buf_len) {
int ret;
int reta;
ret = snprintf(*pos, &(*buf)[*buf_len] - *pos, "START\nPAC-Type=%d\n",
pac->pac_type);
if (os_snprintf_error_15(&(*buf)[*buf_len] - *pos, ret))
return -1;
... | static int eap_teap_add_pac_data(struct eap_teap_pac *pac, char **buf,
char **pos, size_t *buf_len) {
int ret;
ret = os_snprintf(*pos, *buf + *buf_len - *pos, "START\nPAC-Type=%d\n",
pac->pac_type);
if (os_snprintf_error(*buf + *buf_len - *pos, ret))
retur... | eap_teap_add_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_allowed_anon_prov_cipher_suite(u16 cs_0) {
return tls_cipher_suite_match(ok_cs_0, 0x26u, cs_0);
} | int eap_teap_allowed_anon_prov_cipher_suite(u16 cs) {
static const u16 ok_cs[] = {
0x0034, 0x003a, 0x006c, 0x006d, 0x00a6, 0x00a7,
0x0033, 0x0039, 0x0067, 0x006b, 0x009e, 0x009f,
0xc018, 0xc019,
0xc003, 0xc00f, 0xc029, 0xc02a, 0xc031, 0xc032,
0xc004, 0xc005, 0xc025, 0xc026, 0xc02d,... | eap_teap_allowed_anon_prov_cipher_suite | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_allowed_anon_prov_phase2_method(int vendor, eap_type type) {
return !vendor &&
(type == eap_type_EAP_TYPE_PWD || type == eap_type_EAP_TYPE_EKE);
} | int eap_teap_allowed_anon_prov_phase2_method(int vendor, enum eap_type type) {
return vendor == EAP_VENDOR_IETF &&
(type == EAP_TYPE_PWD || type == EAP_TYPE_EKE);
} | eap_teap_allowed_anon_prov_phase2_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_clear(eap_teap_data *data) {
forced_memzero(data->key_data, 0x40u);
forced_memzero(data->emsk, 0x40u);
free(data->session_id);
data->session_id = 0;
wpabuf_free(data->pending_phase2_req);
data->pending_phase2_req = 0;
wpabuf_free(data->pending_resp);
data->pending_resp = 0;
wpabuf_free(d... | static void eap_teap_clear(struct eap_teap_data *data) {
forced_memzero(data->key_data, EAP_TEAP_KEY_LEN);
forced_memzero(data->emsk, EAP_EMSK_LEN);
os_free(data->session_id);
data->session_id = NULL;
wpabuf_free(data->pending_phase2_req);
data->pending_phase2_req = NULL;
wpabuf_free(data->pending_resp);
... | eap_teap_clear | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_clear_pac_opaque_ext(eap_sm *sm, eap_teap_data *data) {
if (tls_connection_client_hello_ext(sm->ssl_ctx, data->ssl.conn, 35, 0, 0) >=
0)
return 0;
wpa_printf(2, "EAP-TEAP: Failed to remove PAC-Opaque TLS extension");
return -1;
} | static int eap_teap_clear_pac_opaque_ext(struct eap_sm *sm,
struct eap_teap_data *data) {
if (tls_connection_client_hello_ext(sm->ssl_ctx, data->ssl.conn,
TLS_EXT_PAC_OPAQUE, NULL, 0) < 0) {
wpa_printf(MSG_DEBUG,
"EAP-TE... | eap_teap_clear_pac_opaque_ext | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_compound_mac(u16 tls_cs, const teap_tlv_crypto_binding *cb,
const wpabuf *server_outer_tlvs,
const wpabuf *peer_outer_tlvs, const u8 *cmk,
u8 *compound_mac) {
__uint16_t v6;
size_t v8;
const void *v9;
size_t v10;
const ... | int eap_teap_compound_mac(u16 tls_cs, const struct teap_tlv_crypto_binding *cb,
const struct wpabuf *server_outer_tlvs,
const struct wpabuf *peer_outer_tlvs, const u8 *cmk,
u8 *compound_mac) {
u8 *pos, *buffer;
size_t bind_len, buffer_len... | eap_teap_compound_mac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_copy_buf(u8 **dst, size_t *dst_len, const u8 *src,
size_t src_len) {
if (src) {
*dst = (u8 *)os_memdup(src, src_len);
if (!*dst)
return -1;
*dst_len = src_len;
}
return 0;
} | static int eap_teap_copy_buf(u8 **dst, size_t *dst_len, const u8 *src,
size_t src_len) {
if (src) {
*dst = os_memdup(src, src_len);
if (!(*dst))
return -1;
*dst_len = src_len;
}
return 0;
} | eap_teap_copy_buf | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_decrypt(eap_sm *sm, eap_teap_data *data, eap_method_ret *ret,
u8 identifier, const wpabuf *in_data, wpabuf **out_data) {
size_t v6;
size_t v8;
int res;
int resa;
int resb;
wpabuf *in_decrypted[2];
in_decrypted[1] = (wpabuf *)__readfsqword(0x28u);
v6 = wpabuf_len_28(in_... | static int eap_teap_decrypt(struct eap_sm *sm, struct eap_teap_data *data,
struct eap_method_ret *ret, u8 identifier,
const struct wpabuf *in_data,
struct wpabuf **out_data) {
struct wpabuf *in_decrypted;
int res;
wpa_printf(MSG_... | eap_teap_decrypt | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_deinit(eap_sm *sm, void *priv) {
eap_teap_pac *pac;
eap_teap_pac *prev;
if (priv) {
if (*((_QWORD *)priv + 13) && *((_QWORD *)priv + 12))
(*(void (**)(eap_sm *, _QWORD))(*((_QWORD *)priv + 12) + 24LL))(
sm, *((_QWORD *)priv + 13));
eap_teap_clear((eap_teap_data *)priv);
... | static void eap_teap_deinit(struct eap_sm *sm, void *priv) {
struct eap_teap_data *data = priv;
struct eap_teap_pac *pac, *prev;
if (!data)
return;
if (data->phase2_priv && data->phase2_method)
data->phase2_method->deinit(sm, data->phase2_priv);
eap_teap_clear(data);
os_free(data->phase2_types);
... | eap_teap_deinit | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_deinit_inner_eap(eap_sm *sm, eap_teap_data *data) {
if (data->phase2_priv) {
if (data->phase2_method) {
wpa_printf(
2, "EAP-TEAP: Phase 2 EAP sequence - deinitialize previous method");
((void (*)(eap_sm *, void *))data->phase2_method->initPickUp)(
sm, data->phase2_pri... | static void eap_teap_deinit_inner_eap(struct eap_sm *sm,
struct eap_teap_data *data) {
if (!data->phase2_priv || !data->phase2_method)
return;
wpa_printf(MSG_DEBUG,
"EAP-TEAP: Phase 2 EAP sequence - deinitialize previous method");
data->phase2_method->deinit... | eap_teap_deinit_inner_eap | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_deinit_pac_data(eap_teap_read_ctx *rc) {
free(rc->buf);
if (rc->f)
fclose(rc->f);
} | static void eap_teap_deinit_pac_data(struct eap_teap_read_ctx *rc) {
os_free(rc->buf);
if (rc->f)
fclose(rc->f);
} | eap_teap_deinit_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_cmk_basic_pw_auth(u16 tls_cs, const u8 *s_imck_msk,
u8 *cmk) {
u8 imsk[32];
u8 imck[72];
unsigned long v7;
v7 = __readfsqword(0x28u);
memset(imsk, 0, sizeof(imsk));
if (eap_teap_tls_prf(tls_cs, s_imck_msk, 0x28u, "Inner Methods Compound Keys",
... | int eap_teap_derive_cmk_basic_pw_auth(u16 tls_cs, const u8 *s_imck_msk,
u8 *cmk) {
u8 imsk[32], imck[EAP_TEAP_IMCK_LEN];
int res;
os_memset(imsk, 0, 32);
res = eap_teap_tls_prf(tls_cs, s_imck_msk, EAP_TEAP_SIMCK_LEN,
"Inner Methods Compound Keys", ... | eap_teap_derive_cmk_basic_pw_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_eap_emsk(u16 tls_cs, const u8 *simck, u8 *emsk) {
if (eap_teap_tls_prf(tls_cs, simck, 0x28u,
"Extended Session Key Generating Function", &byte_26869A,
0, emsk, 0x40u) < 0)
return -1;
wpa_hexdump_key(2, "EAP-TEAP: Derived key (EMSK)", emsk, 0x40u)... | int eap_teap_derive_eap_emsk(u16 tls_cs, const u8 *simck, u8 *emsk) {
if (eap_teap_tls_prf(tls_cs, simck, EAP_TEAP_SIMCK_LEN,
"Extended Session Key Generating Function", (u8 *)"", 0,
emsk, EAP_EMSK_LEN) < 0)
return -1;
wpa_hexdump_key(MSG_DEBUG, "EAP-TEAP: Derived ... | eap_teap_derive_eap_emsk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_eap_msk(u16 tls_cs, const u8 *simck, u8 *msk) {
if (eap_teap_tls_prf(tls_cs, simck, 0x28u, "Session Key Generating Function",
&byte_26869A, 0, msk, 0x40u) < 0)
return -1;
wpa_hexdump_key(2, "EAP-TEAP: Derived key (MSK)", msk, 0x40u);
return 0;
} | int eap_teap_derive_eap_msk(u16 tls_cs, const u8 *simck, u8 *msk) {
if (eap_teap_tls_prf(tls_cs, simck, EAP_TEAP_SIMCK_LEN,
"Session Key Generating Function", (u8 *)"", 0, msk,
EAP_TEAP_KEY_LEN) < 0)
return -1;
wpa_hexdump_key(MSG_DEBUG, "EAP-TEAP: Derived key (MSK... | eap_teap_derive_eap_msk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_imck(u16 tls_cs, const u8 *prev_s_imck_msk,
const u8 *prev_s_imck_emsk, const u8 *msk,
size_t msk_len, const u8 *emsk, size_t emsk_len,
u8 *s_imck_msk, u8 *cmk_msk, u8 *s_imck_emsk,
u8 *cmk_emsk) {
... | int eap_teap_derive_imck(u16 tls_cs, const u8 *prev_s_imck_msk,
const u8 *prev_s_imck_emsk, const u8 *msk,
size_t msk_len, const u8 *emsk, size_t emsk_len,
u8 *s_imck_msk, u8 *cmk_msk, u8 *s_imck_emsk,
u8 *cmk_emsk) {
... | eap_teap_derive_imck | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_key_auth(eap_sm *sm, eap_teap_data *data) {
int res;
res = tls_connection_export_key(sm->ssl_ctx, data->ssl.conn,
"EXPORTER: teap session key seed", 0, 0,
data->simck_msk, 0x28u);
if (res)
return res;
wpa_hexdump_key(2,... | static int eap_teap_derive_key_auth(struct eap_sm *sm,
struct eap_teap_data *data) {
int res;
res = tls_connection_export_key(sm->ssl_ctx, data->ssl.conn,
TEAP_TLS_EXPORTER_LABEL_SKS, NULL, 0,
data->simck_msk, E... | eap_teap_derive_key_auth | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_derive_msk(eap_teap_data *data) {
if (eap_teap_derive_eap_msk(data->tls_cs, data->simck_msk, data->key_data) <
0 ||
eap_teap_derive_eap_emsk(data->tls_cs, data->simck_msk, data->emsk) < 0) {
return -1;
}
data->success = 1;
return 0;
} | static int eap_teap_derive_msk(struct eap_teap_data *data) {
if (eap_teap_derive_eap_msk(data->tls_cs, data->simck_msk, data->key_data) <
0 ||
eap_teap_derive_eap_emsk(data->tls_cs, data->simck_msk, data->emsk) < 0)
return -1;
data->success = 1;
return 0;
} | eap_teap_derive_msk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_free_pac(eap_teap_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_teap_free_pac(struct eap_teap_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_teap_free_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_teap_getKey(eap_sm *sm, void *priv, size_t *len) {
u8 *key;
if (!*((_DWORD *)priv + 82))
return 0;
key = (u8 *)os_memdup((char *)priv + 184, 0x40u);
if (!key)
return 0;
*len = 64;
return key;
} | static u8 *eap_teap_getKey(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_teap_data *data = priv;
u8 *key;
if (!data->success)
return NULL;
key = os_memdup(data->key_data, EAP_TEAP_KEY_LEN);
if (!key)
return NULL;
*len = EAP_TEAP_KEY_LEN;
return key;
} | eap_teap_getKey | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_get_cmk(eap_sm *sm, eap_teap_data *data, u8 *cmk_msk,
u8 *cmk_emsk) {
int res;
size_t msk_len;
size_t emsk_len;
u8 *msk;
u8 *emsk;
unsigned long v12;
v12 = __readfsqword(0x28u);
msk = 0;
emsk = 0;
msk_len = 0;
emsk_len = 0;
wpa_printf(2, "EAP-TEAP: Determining ... | static int eap_teap_get_cmk(struct eap_sm *sm, struct eap_teap_data *data,
u8 *cmk_msk, u8 *cmk_emsk) {
u8 *msk = NULL, *emsk = NULL;
size_t msk_len = 0, emsk_len = 0;
int res;
wpa_printf(MSG_DEBUG,
"EAP-TEAP: Determining CMK[%d] for Compound MAC calculation",
... | eap_teap_get_cmk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_teap_get_emsk(eap_sm *sm, void *priv, size_t *len) {
u8 *key;
if (!*((_DWORD *)priv + 82))
return 0;
key = (u8 *)os_memdup((char *)priv + 264, 0x40u);
if (!key)
return 0;
*len = 64;
return key;
} | static u8 *eap_teap_get_emsk(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_teap_data *data = priv;
u8 *key;
if (!data->success)
return NULL;
key = os_memdup(data->emsk, EAP_EMSK_LEN);
if (!key)
return NULL;
*len = EAP_EMSK_LEN;
return key;
} | eap_teap_get_emsk | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
eap_teap_pac *eap_teap_get_pac(eap_teap_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_teap_pac *eap_teap_get_pac(struct eap_teap_pac *pac_root,
const u8 *a_id, size_t a_id_len,
u16 pac_type) {
struct eap_teap_pac *pac = pac_root;
while (pac) {
if (pac->pac_type == pac_type && pac->a_id_len == a_id_len &&
... | eap_teap_get_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_teap_get_session_id(eap_sm *sm, void *priv, size_t *len) {
u8 *id;
if (!*((_DWORD *)priv + 82) || !*((_QWORD *)priv + 31))
return 0;
id = (u8 *)os_memdup(*((const void **)priv + 31), *((_QWORD *)priv + 32));
if (!id)
return 0;
*len = *((_QWORD *)priv + 32);
return id;
} | static u8 *eap_teap_get_session_id(struct eap_sm *sm, void *priv, size_t *len) {
struct eap_teap_data *data = priv;
u8 *id;
if (!data->success || !data->session_id)
return NULL;
id = os_memdup(data->session_id, data->id_len);
if (!id)
return NULL;
*len = data->id_len;
return id;
} | eap_teap_get_session_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_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-TEAP Phase 2 method=%s\n",... | static int eap_teap_get_status(struct eap_sm *sm, void *priv, char *buf,
size_t buflen, int verbose) {
struct eap_teap_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_teap_get_status | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void *eap_teap_init(eap_sm *sm) {
eap_peer_config *config;
eap_teap_data *data;
config = eap_get_config(sm);
if (!config)
return 0;
data = (eap_teap_data *)os_zalloc(0x1E8u);
if (!data)
return 0;
data->teap_version = 1;
data->max_pac_list_len = 10;
if (config->phase1)
eap_teap_parse_phase... | static void *eap_teap_init(struct eap_sm *sm) {
struct eap_teap_data *data;
struct eap_peer_config *config = eap_get_config(sm);
if (!config)
return NULL;
data = os_zalloc(sizeof(*data));
if (!data)
return NULL;
data->teap_version = EAP_TEAP_VERSION;
data->max_pac_list_len = 10;
if (config->p... | eap_teap_init | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_init_pac_data(eap_sm *sm, const char *pac_file,
eap_teap_read_ctx *rc) {
const wpa_config_blob *blob;
memset(rc, 0, sizeof(eap_teap_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_teap_init_pac_data(struct eap_sm *sm, const char *pac_file,
struct eap_teap_read_ctx *rc) {
os_memset(rc, 0, sizeof(*rc));
rc->buf_len = 2048;
rc->buf = os_malloc(rc->buf_len);
if (!rc->buf)
return -1;
if (os_strncmp(pac_file, "blob://", 7) == 0) {
co... | eap_teap_init_pac_data | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_init_phase2_method(eap_sm *sm, eap_teap_data *data) {
data->inner_method_done = 0;
data->iresult_verified = 0;
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;
sm->init_... | static int eap_teap_init_phase2_method(struct eap_sm *sm,
struct eap_teap_data *data) {
data->inner_method_done = 0;
data->iresult_verified = 0;
data->phase2_method = eap_peer_get_eap_method(data->phase2_type.vendor,
data->phas... | eap_teap_init_phase2_method | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
bool eap_teap_isKeyAvailable(eap_sm *sm, void *priv) {
return *((_DWORD *)priv + 82) != 0;
} | static bool eap_teap_isKeyAvailable(struct eap_sm *sm, void *priv) {
struct eap_teap_data *data = priv;
return data->success;
} | eap_teap_isKeyAvailable | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_load_pac(eap_sm *sm, eap_teap_pac **pac_root,
const char *pac_file) {
int count;
eap_teap_pac *pac;
char *pos;
const char *err;
eap_teap_read_ctx rc;
unsigned long v10;
v10 = __readfsqword(0x28u);
pac = 0;
count = 0;
err = 0;
if (!pac_file)
return -1;
if (... | int eap_teap_load_pac(struct eap_sm *sm, struct eap_teap_pac **pac_root,
const char *pac_file) {
struct eap_teap_read_ctx rc;
struct eap_teap_pac *pac = NULL;
int count = 0;
char *pos;
const char *err = NULL;
if (!pac_file)
return -1;
if (eap_teap_init_pac_data(sm, pac_file, &r... | eap_teap_load_pac | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_load_pac_bin(eap_sm *sm, eap_teap_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_teap_pac *pac;
eap_teap_pac *prev;
u8 *end;
unsigned long v... | int eap_teap_load_pac_bin(struct eap_sm *sm, struct eap_teap_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_teap_pac *pac, *prev;
*pac_root = NULL;
if (!pac_file)
return -1;
if (os_s... | eap_teap_load_pac_bin | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_pac_get_a_id(eap_teap_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_8(pos);
posb = (u8 *)(pos + 2);
len = WPA_GET_BE16_8(posb);
posa = posb ... | static void eap_teap_pac_get_a_id(struct eap_teap_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_teap_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_teap_pac_list_truncate(eap_teap_pac *pac_root, size_t max_len) {
eap_teap_pac *prev;
eap_teap_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_teap_pac_list_truncate(struct eap_teap_pac *pac_root,
size_t max_len) {
struct eap_teap_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_teap_pac_list_truncate | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
wpabuf *eap_teap_pac_request() {
wpabuf *req;
teap_tlv_request_action *act;
teap_tlv_hdr *pac;
teap_attr_pac_type *type;
req = wpabuf_alloc(0x10u);
if (!req)
return 0;
wpa_printf(2, "EAP-TEAP: Add Request Action TLV (Process TLV)");
act = (teap_tlv_request_action *)wpabuf_put(req, 6u);
act->tlv_t... | static struct wpabuf *eap_teap_pac_request(void) {
struct wpabuf *req;
struct teap_tlv_request_action *act;
struct teap_tlv_hdr *pac;
struct teap_attr_pac_type *type;
req = wpabuf_alloc(sizeof(*act) + sizeof(*pac) + sizeof(*type));
if (!req)
return NULL;
wpa_printf(MSG_DEBUG, "EAP-TEAP: Add Request ... | eap_teap_pac_request | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_teap_parse_a_id(eap_teap_pac *pac, char *pos) {
free(pac->a_id);
pac->a_id = eap_teap_parse_hex(pos, &pac->a_id_len);
if (pac->a_id)
return 0;
else
return "Invalid A-ID";
} | static const char *eap_teap_parse_a_id(struct eap_teap_pac *pac, char *pos) {
os_free(pac->a_id);
pac->a_id = eap_teap_parse_hex(pos, &pac->a_id_len);
if (!pac->a_id)
return "Invalid A-ID";
return NULL;
} | eap_teap_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_teap_parse_a_id_info(eap_teap_pac *pac, char *pos) {
free(pac->a_id_info);
pac->a_id_info = eap_teap_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_teap_parse_a_id_info(struct eap_teap_pac *pac,
char *pos) {
os_free(pac->a_id_info);
pac->a_id_info = eap_teap_parse_hex(pos, &pac->a_id_info_len);
if (!pac->a_id_info)
return "Invalid A-ID-Info";
return NULL;
} | eap_teap_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_teap_parse_decrypted(wpabuf *decrypted, eap_teap_tlv_parse *tlv,
wpabuf **resp) {
const char *v4;
const char *v5;
u16 tlv_type;
int mandatory;
int res;
u8 *pos;
u8 *posb;
u8 *posa;
u8 *end;
size_t len;
memset(tlv, 0, sizeof(eap_teap_tlv_parse));
pos = (u8 *)... | static int eap_teap_parse_decrypted(struct wpabuf *decrypted,
struct eap_teap_tlv_parse *tlv,
struct wpabuf **resp) {
u16 tlv_type;
int mandatory, res;
size_t len;
u8 *pos, *end;
os_memset(tlv, 0, sizeof(*tlv));
pos = wpabuf_mhead(dec... | eap_teap_parse_decrypted | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_teap_parse_end(eap_teap_pac **pac_root, eap_teap_pac **pac) {
eap_teap_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_teap_parse_end(struct eap_teap_pac **pac_root,
struct eap_teap_pac **pac) {
if (!(*pac))
return "END line without START";
if (*pac_root) {
struct eap_teap_pac *end = *pac_root;
while (end->next)
end = end->next;
end->next = *pac;
... | eap_teap_parse_end | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
u8 *eap_teap_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_teap_parse_hex(const char *value, size_t *len) {
int hlen;
u8 *buf;
if (!value)
return NULL;
hlen = os_strlen(value);
if (hlen & 1)
return NULL;
*len = hlen / 2;
buf = os_malloc(*len);
if (!buf)
return NULL;
if (hexstr2bin(value, buf, *len)) {
os_free(buf);
return N... | eap_teap_parse_hex | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
const char *eap_teap_parse_i_id(eap_teap_pac *pac, char *pos) {
free(pac->i_id);
pac->i_id = eap_teap_parse_hex(pos, &pac->i_id_len);
if (pac->i_id)
return 0;
else
return "Invalid I-ID";
} | static const char *eap_teap_parse_i_id(struct eap_teap_pac *pac, char *pos) {
os_free(pac->i_id);
pac->i_id = eap_teap_parse_hex(pos, &pac->i_id_len);
if (!pac->i_id)
return "Invalid I-ID";
return NULL;
} | eap_teap_parse_i_id | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
int eap_teap_parse_pac_info(eap_teap_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_8(pos);
os_get_tim... | static int eap_teap_parse_pac_info(struct eap_teap_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-TEAP... | eap_teap_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_teap_parse_pac_key(eap_teap_pac *pac, char *pos) {
size_t key_len;
u8 *key;
unsigned long v5;
v5 = __readfsqword(0x28u);
key = eap_teap_parse_hex(pos, &key_len);
if (key && key_len == 48) {
memcpy(pac->pac_key, key, sizeof(pac->pac_key));
free(key);
return 0;
} else {
free... | static const char *eap_teap_parse_pac_key(struct eap_teap_pac *pac, char *pos) {
u8 *key;
size_t key_len;
key = eap_teap_parse_hex(pos, &key_len);
if (!key || key_len != EAP_TEAP_PAC_KEY_LEN) {
os_free(key);
return "Invalid PAC-Key";
}
os_memcpy(pac->pac_key, key, EAP_TEAP_PAC_KEY_LEN);
os_free(... | eap_teap_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_teap_parse_pac_opaque(eap_teap_pac *pac, char *pos) {
free(pac->pac_opaque);
pac->pac_opaque = eap_teap_parse_hex(pos, &pac->pac_opaque_len);
if (pac->pac_opaque)
return 0;
else
return "Invalid PAC-Opaque";
} | static const char *eap_teap_parse_pac_opaque(struct eap_teap_pac *pac,
char *pos) {
os_free(pac->pac_opaque);
pac->pac_opaque = eap_teap_parse_hex(pos, &pac->pac_opaque_len);
if (!pac->pac_opaque)
return "Invalid PAC-Opaque";
return NULL;
} | eap_teap_parse_pac_opaque | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_parse_pac_tlv(eap_teap_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-TEAP: PAC-Info", pos, len);
entry->pac_info = pos;
entry->pac_info_len = len;
return;
}
if ((type & ... | static void eap_teap_parse_pac_tlv(struct eap_teap_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-TEAP: PAC-Key", pos, len);
if (len != EAP_TEAP_PAC_KEY_LEN) {
wpa_print... | eap_teap_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_teap_parse_pac_type(eap_teap_pac *pac, char *pos) {
if (!pos)
return "Cannot parse pac type";
pac->pac_type = atoi(pos);
if (pac->pac_type == 1)
return 0;
else
return "Unrecognized PAC-Type";
} | static const char *eap_teap_parse_pac_type(struct eap_teap_pac *pac,
char *pos) {
if (!pos)
return "Cannot parse pac type";
pac->pac_type = atoi(pos);
if (pac->pac_type != PAC_TYPE_TUNNEL_PAC)
return "Unrecognized PAC-Type";
return NULL;
} | eap_teap_parse_pac_type | wpa_supplicant-2.10-r1 | net-wireless | O0/net-wireless/wpa_supplicant-2.10-r1/wpa_supplicant | ida | O0 |
void eap_teap_parse_phase1(eap_teap_data *data, const char *phase1) {
char *pos;
char *posa;
pos = strstr(phase1, "teap_provisioning=");
if (pos) {
data->provisioning_allowed = atoi(pos + 18);
wpa_printf(2, "EAP-TEAP: Automatic PAC provisioning mode: %d",
data->provisioning_allowed);
}... | static void eap_teap_parse_phase1(struct eap_teap_data *data,
const char *phase1) {
const char *pos;
pos = os_strstr(phase1, "teap_provisioning=");
if (pos) {
data->provisioning_allowed = atoi(pos + 18);
wpa_printf(MSG_DEBUG, "EAP-TEAP: Automatic PAC provisioning mode: %... | eap_teap_parse_phase1 | 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.