ikev2: remove unused hash computation 52/27352/3
authorFilip Tehlar <ftehlar@cisco.com>
Mon, 25 May 2020 21:35:55 +0000 (21:35 +0000)
committerBenoît Ganne <bganne@cisco.com>
Tue, 2 Jun 2020 12:17:04 +0000 (12:17 +0000)
Type: improvement

Change-Id: I99c2383dd0d30efd1837f3d10ff2e4cf3a784283
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
src/plugins/ikev2/ikev2.c

index b49832d..11aadfb 100644 (file)
@@ -1536,7 +1536,7 @@ static void
 ikev2_sa_auth_init (ikev2_sa_t * sa)
 {
   ikev2_main_t *km = &ikev2_main;
-  u8 *authmsg, *key_pad, *psk = 0, *auth = 0;
+  u8 *authmsg, *key_pad, *psk = 0;
   ikev2_sa_transform_t *tr_prf;
 
   tr_prf =
@@ -1556,8 +1556,6 @@ ikev2_sa_auth_init (ikev2_sa_t * sa)
   key_pad = format (0, "%s", IKEV2_KEY_PAD);
   authmsg = ikev2_sa_generate_authmsg (sa, 0);
   psk = ikev2_calc_prf (tr_prf, sa->i_auth.data, key_pad);
-  auth = ikev2_calc_prf (tr_prf, psk, authmsg);
-
 
   if (sa->i_auth.method == IKEV2_AUTH_METHOD_SHARED_KEY_MIC)
     {
@@ -1572,7 +1570,6 @@ ikev2_sa_auth_init (ikev2_sa_t * sa)
 
   vec_free (psk);
   vec_free (key_pad);
-  vec_free (auth);
   vec_free (authmsg);
 }