aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_sim.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2018-12-14 13:56:16 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-14 13:56:16 (GMT)
commit79fec6a92d69654af8b90715e7fd41e49238bbfa (patch)
tree4179cdf69f336c0a784ef05e0eb636cf021eac4e /src/eap_server/eap_server_sim.c
parentfb2dc898d630936385f65db195d523087416dd27 (diff)
downloadhostap-79fec6a92d69654af8b90715e7fd41e49238bbfa.zip
hostap-79fec6a92d69654af8b90715e7fd41e49238bbfa.tar.gz
hostap-79fec6a92d69654af8b90715e7fd41e49238bbfa.tar.bz2
EAP: Make method and IMSI available from server structures
Expose EAP method and IMSI from the completed (or ongoing) EAP authentication session. These are needed for implementing Hotspot 2.0 SIM provisioning. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/eap_server/eap_server_sim.c')
-rw-r--r--src/eap_server/eap_server_sim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eap_server/eap_server_sim.c b/src/eap_server/eap_server_sim.c
index 10637d4..1287827 100644
--- a/src/eap_server/eap_server_sim.c
+++ b/src/eap_server/eap_server_sim.c
@@ -535,6 +535,9 @@ skip_id_update:
goto failed;
}
+ if (data->permanent[0] == EAP_SIM_PERMANENT_PREFIX)
+ os_strlcpy(sm->imsi, &data->permanent[1], sizeof(sm->imsi));
+
identity_len = sm->identity_len;
while (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
wpa_printf(MSG_DEBUG, "EAP-SIM: Workaround - drop last null "