Lines Matching full:sim

2  * hostapd / EAP-SIM database/authenticator gateway
8 * This is an example implementation of the EAP-SIM/AKA database/authentication
12 * EAP-SIM/AKA pseudonyms and re-auth identities. It can be used with different
48 } sim; member
103 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Adding database table for " in db_table_create_pseudonym()
106 wpa_printf(MSG_ERROR, "EAP-SIM DB: SQLite error: %s", err); in db_table_create_pseudonym()
129 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Adding database table for " in db_table_create_reauth()
132 wpa_printf(MSG_ERROR, "EAP-SIM DB: SQLite error: %s", err); in db_table_create_reauth()
146 wpa_printf(MSG_ERROR, "EAP-SIM DB: Failed to open database " in db_open()
198 wpa_printf(MSG_ERROR, "EAP-SIM DB: SQLite error: %s", err); in db_add_pseudonym()
298 wpa_printf(MSG_ERROR, "EAP-SIM DB: SQLite error: %s", err); in db_add_reauth()
435 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Delete query timeout for %p", entry); in eap_sim_db_del_timeout()
449 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Query timeout for %p", entry); in eap_sim_db_query_timeout()
464 * SIM-RESP-AUTH <IMSI> Kc(i):SRES(i):RAND(i) ... in eap_sim_db_sim_resp_auth()
465 * SIM-RESP-AUTH <IMSI> FAILURE in eap_sim_db_sim_resp_auth()
471 wpa_printf(MSG_DEBUG, "EAP-SIM DB: No pending entry for the " in eap_sim_db_sim_resp_auth()
478 wpa_printf(MSG_DEBUG, "EAP-SIM DB: External server reported " in eap_sim_db_sim_resp_auth()
496 if (hexstr2bin(start, entry->u.sim.kc[num_chal], in eap_sim_db_sim_resp_auth()
505 if (hexstr2bin(start, entry->u.sim.sres[num_chal], in eap_sim_db_sim_resp_auth()
510 if (hexstr2bin(start, entry->u.sim.rand[num_chal], in eap_sim_db_sim_resp_auth()
520 entry->u.sim.num_chal = num_chal; in eap_sim_db_sim_resp_auth()
523 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Authentication data parsed " in eap_sim_db_sim_resp_auth()
530 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Failed to parse response string"); in eap_sim_db_sim_resp_auth()
549 wpa_printf(MSG_DEBUG, "EAP-SIM DB: No pending entry for the " in eap_sim_db_aka_resp_auth()
556 wpa_printf(MSG_DEBUG, "EAP-SIM DB: External server reported " in eap_sim_db_aka_resp_auth()
606 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Too long RES"); in eap_sim_db_aka_resp_auth()
614 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Authentication data parsed " in eap_sim_db_aka_resp_auth()
621 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Failed to parse response string"); in eap_sim_db_aka_resp_auth()
636 wpa_hexdump_ascii_key(MSG_MSGDUMP, "EAP-SIM DB: Received from an " in eap_sim_db_receive()
642 wpa_printf(MSG_DEBUG, "EAP-SIM DB: No get_complete_cb " in eap_sim_db_receive()
659 wpa_printf(MSG_DEBUG, "EAP-SIM DB: External response=%s for IMSI %s", in eap_sim_db_receive()
662 if (os_strcmp(cmd, "SIM-RESP-AUTH") == 0) in eap_sim_db_receive()
667 wpa_printf(MSG_INFO, "EAP-SIM DB: Unknown external response " in eap_sim_db_receive()
672 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Failed to parse response string"); in eap_sim_db_receive()
747 * eap_sim_db_init - Initialize EAP-SIM DB / authentication gateway interface
786 wpa_printf(MSG_DEBUG, "EAP-SIM DB: External database " in eap_sim_db_init()
819 * eap_sim_db_deinit - Deinitialize EAP-SIM DB/authentication gw interface
871 wpa_printf(MSG_INFO, "send[EAP-SIM DB UNIX]: %s", in eap_sim_db_send()
881 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Reconnected to the " in eap_sim_db_send()
884 wpa_printf(MSG_INFO, "send[EAP-SIM DB UNIX]: %s", in eap_sim_db_send()
938 wpa_printf(MSG_DEBUG, "EAP-SIM DB: unexpected username '%s'", in eap_sim_db_get_gsm_triplets()
943 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Get GSM triplets for IMSI '%s'", in eap_sim_db_get_gsm_triplets()
950 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Pending entry -> " in eap_sim_db_get_gsm_triplets()
957 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Pending entry -> " in eap_sim_db_get_gsm_triplets()
963 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Pending entry -> " in eap_sim_db_get_gsm_triplets()
964 "%d challenges", entry->u.sim.num_chal); in eap_sim_db_get_gsm_triplets()
965 num_chal = entry->u.sim.num_chal; in eap_sim_db_get_gsm_triplets()
968 os_memcpy(_rand, entry->u.sim.rand, num_chal * GSM_RAND_LEN); in eap_sim_db_get_gsm_triplets()
969 os_memcpy(sres, entry->u.sim.sres, in eap_sim_db_get_gsm_triplets()
971 os_memcpy(kc, entry->u.sim.kc, num_chal * EAP_SIM_KC_LEN); in eap_sim_db_get_gsm_triplets()
982 len = os_snprintf(msg, sizeof(msg), "SIM-REQ-AUTH "); in eap_sim_db_get_gsm_triplets()
993 wpa_printf(MSG_DEBUG, "EAP-SIM DB: requesting SIM authentication " in eap_sim_db_get_gsm_triplets()
1007 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Added query %p", entry); in eap_sim_db_get_gsm_triplets()
1034 * eap_sim_db_get_next_pseudonym - EAP-SIM DB: Get next pseudonym
1036 * @method: EAP method (SIM/AKA/AKA')
1039 * This function is used to generate a pseudonym for EAP-SIM. The returned
1066 * eap_sim_db_get_next_reauth_id - EAP-SIM DB: Get next reauth_id
1068 * @method: EAP method (SIM/AKA/AKA')
1072 * EAP-SIM. The returned reauth_id is not added to database at this point; it
1099 * eap_sim_db_add_pseudonym - EAP-SIM DB: Add new pseudonym
1107 * This function adds a new pseudonym for EAP-SIM user. EAP-SIM DB is
1114 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Add pseudonym '%s' for permanent " in eap_sim_db_add_pseudonym()
1127 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Replacing previous " in eap_sim_db_add_pseudonym()
1150 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Added new pseudonym entry"); in eap_sim_db_add_pseudonym()
1168 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Replacing previous " in eap_sim_db_add_reauth_data()
1188 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Added new reauth entry"); in eap_sim_db_add_reauth_data()
1198 * eap_sim_db_add_reauth - EAP-SIM DB: Add new re-authentication entry
1209 * This function adds a new re-authentication entry for an EAP-SIM user.
1210 * EAP-SIM DB is responsible of freeing reauth_id buffer once it is not needed
1218 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Add reauth_id '%s' for permanent " in eap_sim_db_add_reauth()
1251 * EAP-SIM DB is responsible of freeing reauth_id buffer once it is not needed
1261 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Add reauth_id '%s' for permanent " in eap_sim_db_add_reauth_prime()
1283 * eap_sim_db_get_permanent - EAP-SIM DB: Get permanent identity
1310 * eap_sim_db_get_reauth_entry - EAP-SIM DB: Get re-authentication entry
1338 * eap_sim_db_remove_reauth - EAP-SIM DB: Remove re-authentication entry
1407 wpa_printf(MSG_DEBUG, "EAP-SIM DB: unexpected username '%s'", in eap_sim_db_get_aka_auth()
1412 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Get AKA auth for IMSI '%s'", in eap_sim_db_get_aka_auth()
1419 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Failure"); in eap_sim_db_get_aka_auth()
1425 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Pending"); in eap_sim_db_get_aka_auth()
1429 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Returning successfully " in eap_sim_db_get_aka_auth()
1454 wpa_printf(MSG_DEBUG, "EAP-SIM DB: requesting AKA authentication " in eap_sim_db_get_aka_auth()
1469 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Added query %p", entry); in eap_sim_db_get_aka_auth()
1500 wpa_printf(MSG_DEBUG, "EAP-SIM DB: unexpected username '%s'", in eap_sim_db_resynchronize()
1505 wpa_printf(MSG_DEBUG, "EAP-SIM DB: Get AKA auth for IMSI '%s'", in eap_sim_db_resynchronize()
1532 wpa_printf(MSG_DEBUG, "EAP-SIM DB: reporting AKA AUTS for " in eap_sim_db_resynchronize()
1543 * sim_get_username - Extract username from SIM identity