Lines Matching full:identity
452 if (config->identity) { in eap_get_realm()
454 if (config->identity[i] == '@') in eap_get_realm()
462 os_memcpy(realm, &config->identity[i + 1], realm_len); in eap_get_realm()
486 /* When identity is not provided in the config, build the realm from in eap_get_realm()
489 if (!config->identity && !config->anonymous_identity && in eap_get_realm()
992 * Handles requests for Identity method and builds a response.
994 SM_STATE(EAP, IDENTITY) in SM_STATE() argument
998 SM_ENTRY(EAP, IDENTITY); in SM_STATE()
1244 SM_ENTER(EAP, SUCCESS); /* EAP-Success after Identity */ in eap_peer_sm_step_received()
1263 SM_ENTER(EAP, IDENTITY); in eap_peer_sm_step_received()
1512 * RFC 3748 - 5.1: Identity in eap_sm_processIdentity()
1520 wpa_hexdump_ascii(MSG_DEBUG, "EAP: EAP-Request Identity data", in eap_sm_processIdentity()
1567 wpa_printf(MSG_WARNING, "Too short IMSI for SIM identity"); in eap_sm_imsi_identity()
1583 wpa_printf(MSG_WARNING, "Could not add realm to SIM identity"); in eap_sm_imsi_identity()
1603 os_free(conf->identity); in eap_sm_imsi_identity()
1604 conf->identity = os_malloc(1 + imsi_len); in eap_sm_imsi_identity()
1605 if (conf->identity == NULL) { in eap_sm_imsi_identity()
1607 "IMSI-based identity"); in eap_sm_imsi_identity()
1613 conf->identity[0] = '1'; in eap_sm_imsi_identity()
1616 conf->identity[0] = '0'; in eap_sm_imsi_identity()
1619 conf->identity[0] = '6'; in eap_sm_imsi_identity()
1622 os_memcpy(conf->identity + 1, imsi, imsi_len); in eap_sm_imsi_identity()
1661 * eap_sm_buildIdentity - Build EAP-Identity/Response for the current network
1665 * Returns: Pointer to the allocated EAP-Identity/Response packet or %NULL on
1668 * This function allocates and builds an EAP-Identity/Response packet for the
1675 const u8 *identity; in eap_sm_buildIdentity() local
1686 (identity = sm->m->get_identity(sm, sm->eap_method_priv, in eap_sm_buildIdentity()
1689 "identity", identity, identity_len); in eap_sm_buildIdentity()
1691 identity = config->anonymous_identity; in eap_sm_buildIdentity()
1693 wpa_hexdump_ascii(MSG_DEBUG, "EAP: using anonymous identity", in eap_sm_buildIdentity()
1694 identity, identity_len); in eap_sm_buildIdentity()
1696 identity = config->machine_identity; in eap_sm_buildIdentity()
1698 wpa_hexdump_ascii(MSG_DEBUG, "EAP: using machine identity", in eap_sm_buildIdentity()
1699 identity, identity_len); in eap_sm_buildIdentity()
1700 } else if (config->imsi_privacy_cert && config->identity && in eap_sm_buildIdentity()
1702 const u8 *pos = config->identity; in eap_sm_buildIdentity()
1703 const u8 *end = config->identity + config->identity_len; in eap_sm_buildIdentity()
1719 identity = wpabuf_head(privacy_identity); in eap_sm_buildIdentity()
1722 "EAP: using IMSI privacy anonymous identity", in eap_sm_buildIdentity()
1723 identity, identity_len); in eap_sm_buildIdentity()
1725 identity = config->identity; in eap_sm_buildIdentity()
1727 wpa_hexdump_ascii(MSG_DEBUG, "EAP: using real identity", in eap_sm_buildIdentity()
1728 identity, identity_len); in eap_sm_buildIdentity()
1733 if (!identity) { in eap_sm_buildIdentity()
1736 identity = config->identity; in eap_sm_buildIdentity()
1739 "permanent identity from IMSI", in eap_sm_buildIdentity()
1740 identity, identity_len); in eap_sm_buildIdentity()
1747 } else if (!identity) { in eap_sm_buildIdentity()
1749 "EAP: buildIdentity: identity configuration was not available"); in eap_sm_buildIdentity()
1759 wpabuf_put_data(resp, identity, identity_len); in eap_sm_buildIdentity()
1761 os_free(sm->identity); in eap_sm_buildIdentity()
1762 sm->identity = os_memdup(identity, identity_len); in eap_sm_buildIdentity()
2276 os_free(sm->identity); in eap_peer_sm_deinit()
2348 return "IDENTITY"; in eap_sm_state_txt()
2549 * eap_sm_request_identity - Request identity from user (ctrl_iface)
2552 * EAP methods can call this function to request identity information for the
2553 * current network. This is normally called when the identity is not included
2800 * eap_get_config_identity - Get identity from the network configuration
2802 * @len: Buffer for the length of the identity
2803 * Returns: Pointer to the identity or %NULL if not found
2818 return config->identity; in eap_get_config_identity()
3245 os_memcmp(conf->identity, WSC_ID_ENROLLEE, WSC_ID_ENROLLEE_LEN)) in eap_is_wps_pbc_enrollee()
3258 os_memcmp(conf->identity, WSC_ID_ENROLLEE, WSC_ID_ENROLLEE_LEN)) in eap_is_wps_pin_enrollee()
3277 * eap_set_anon_id - Set or add anonymous identity
3279 * @id: Anonymous identity (e.g., EAP-SIM pseudonym) or %NULL to clear
3280 * @len: Length of anonymous identity in octets