aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-02-19 05:09:31 +0000
committerBeno�t Ganne <bganne@cisco.com>2021-03-02 14:40:06 +0000
commitd7a32cb06a184be3e0387c888a4da1835e193ec0 (patch)
tree50f8a586d133d0db3a4a7e87a9f36effc9596749 /src
parent5943e36b60955ff7baaac383dcd121e36c999711 (diff)
ikev2: fix auth
Old auth data is needed when generating new one. Type: fix Change-Id: I15c62346dbb7ece8facdc7a05f30afd1a15a5648 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/ikev2/ikev2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index 7c57f22d5a3..aeed73ecdc3 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -1799,9 +1799,9 @@ ikev2_sa_auth_init (ikev2_sa_t * sa)
if (sa->i_auth.method == IKEV2_AUTH_METHOD_SHARED_KEY_MIC)
{
- vec_free (sa->i_auth.data);
key_pad = format (0, "%s", IKEV2_KEY_PAD);
psk = ikev2_calc_prf (tr_prf, sa->i_auth.data, key_pad);
+ vec_free (sa->i_auth.data);
sa->i_auth.data = ikev2_calc_prf (tr_prf, psk, authmsg);
sa->i_auth.method = IKEV2_AUTH_METHOD_SHARED_KEY_MIC;
vec_free (psk);