]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-AKA server: Split fullauth setup into a separate function
authorJouni Malinen <j@w1.fi>
Sat, 1 Sep 2012 16:37:49 +0000 (19:37 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 1 Sep 2012 16:37:49 +0000 (19:37 +0300)
This is an initial cleanup step for AKA/Identity processing.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/eap_server/eap_server_aka.c

index e98eaa4253390878f3d9cac0a67997d78e83de38..a8104cde8c87ab1e4e37ca53ceb377cbc4a21531 100644 (file)
@@ -621,13 +621,15 @@ static Boolean eap_aka_subtype_ok(struct eap_aka_data *data, u8 subtype)
 }
 
 
+static void eap_aka_fullauth(struct eap_sm *sm, struct eap_aka_data *data,
+                            const u8 *identity, size_t identity_len);
+
 static void eap_aka_determine_identity(struct eap_sm *sm,
                                       struct eap_aka_data *data,
                                       int before_identity, int after_reauth)
 {
        const u8 *identity;
        size_t identity_len;
-       int res;
 
        identity = NULL;
        identity_len = 0;
@@ -706,6 +708,16 @@ static void eap_aka_determine_identity(struct eap_sm *sm,
                return;
        }
 
+
+       eap_aka_fullauth(sm, data, identity, identity_len);
+}
+
+
+static void eap_aka_fullauth(struct eap_sm *sm, struct eap_aka_data *data,
+                            const u8 *identity, size_t identity_len)
+{
+       int res;
+
        res = eap_sim_db_get_aka_auth(sm->eap_sim_db_priv, identity,
                                      identity_len, data->rand, data->autn,
                                      data->ik, data->ck, data->res,