aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_aka.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-06-15 15:49:54 (GMT)
committerJouni Malinen <j@w1.fi>2012-06-15 15:49:54 (GMT)
commit1cebaabd80db8f346b3f2d996b5d7d1629029be3 (patch)
treec875cc2c40ab7bbade5af95c1ae9e56c26a01765 /src/eap_server/eap_server_aka.c
parentef35f5a0fd2c41f92a3ecc29995c5de1f407d2af (diff)
downloadhostap-1cebaabd80db8f346b3f2d996b5d7d1629029be3.zip
hostap-1cebaabd80db8f346b3f2d996b5d7d1629029be3.tar.gz
hostap-1cebaabd80db8f346b3f2d996b5d7d1629029be3.tar.bz2
EAP-SIM/AKA server: Allow pseudonym to be used after unknown reauth id
If the peer uses an unknown reauth id, it would still be possible to use pseudonym instead of permanent id. Allow this by changing the AT_PERMANENT_ID_REQ to AT_FULLAUTH_ID_REQ in case unknown reauth id is used in EAP-Response/Identity. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/eap_server/eap_server_aka.c')
-rw-r--r--src/eap_server/eap_server_aka.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/eap_server/eap_server_aka.c b/src/eap_server/eap_server_aka.c
index de05dd5..9cd5509 100644
--- a/src/eap_server/eap_server_aka.c
+++ b/src/eap_server/eap_server_aka.c
@@ -266,8 +266,18 @@ static struct wpabuf * eap_aka_build_identity(struct eap_sm *sm,
EAP_AKA_SUBTYPE_IDENTITY);
if (eap_sim_db_identity_known(sm->eap_sim_db_priv, sm->identity,
sm->identity_len)) {
- wpa_printf(MSG_DEBUG, " AT_PERMANENT_ID_REQ");
- eap_sim_msg_add(msg, EAP_SIM_AT_PERMANENT_ID_REQ, 0, NULL, 0);
+ if (sm->identity_len > 0 &&
+ (sm->identity[0] == EAP_AKA_REAUTH_ID_PREFIX ||
+ sm->identity[0] == EAP_AKA_PRIME_REAUTH_ID_PREFIX)) {
+ /* Reauth id may have expired - try fullauth */
+ wpa_printf(MSG_DEBUG, " AT_FULLAUTH_ID_REQ");
+ eap_sim_msg_add(msg, EAP_SIM_AT_FULLAUTH_ID_REQ, 0,
+ NULL, 0);
+ } else {
+ wpa_printf(MSG_DEBUG, " AT_PERMANENT_ID_REQ");
+ eap_sim_msg_add(msg, EAP_SIM_AT_PERMANENT_ID_REQ, 0,
+ NULL, 0);
+ }
} else {
/*
* RFC 4187, Chap. 4.1.4 recommends that identity from EAP is