Home | History | Annotate | Download | only in eap_peer

Lines Matching defs:imsi

929  * Rules for figuring out MNC length based on IMSI for SIM cards that do not
932 static int mnc_len_from_imsi(const char *imsi)
937 os_memcpy(mcc_str, imsi, 3);
950 static int eap_sm_append_3gpp_realm(struct eap_sm *sm, char *imsi,
957 wpa_printf(MSG_WARNING, "No room for realm in IMSI buffer");
964 mnc_len = mnc_len_from_imsi(imsi);
973 mnc[1] = imsi[3];
974 mnc[2] = imsi[4];
976 mnc[0] = imsi[3];
977 mnc[1] = imsi[4];
978 mnc[2] = imsi[5];
982 pos = imsi + *imsi_len;
983 pos += os_snprintf(pos, imsi + max_len - pos,
985 mnc, imsi[0], imsi[1], imsi[2]);
986 *imsi_len = pos - imsi;
996 char imsi[100];
1001 imsi_len = sizeof(imsi);
1002 if (scard_get_imsi(sm->scard_ctx, imsi, &imsi_len)) {
1003 wpa_printf(MSG_WARNING, "Failed to get IMSI from SIM");
1007 wpa_hexdump_ascii(MSG_DEBUG, "IMSI", (u8 *) imsi, imsi_len);
1010 wpa_printf(MSG_WARNING, "Too short IMSI for SIM identity");
1014 if (eap_sm_append_3gpp_realm(sm, imsi, sizeof(imsi), &imsi_len) < 0) {
1018 wpa_hexdump_ascii(MSG_DEBUG, "IMSI + realm", (u8 *) imsi, imsi_len);
1039 "IMSI-based identity");
1054 os_memcpy(conf->identity + 1, imsi, imsi_len);
1149 "IMSI", identity, identity_len);