From 6abadfbe0b3e10fff89579b20e8d3a47f5eafd4d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 1 Apr 2012 03:44:11 +0200 Subject: ecfxp: delete handshake data after handshake is finished --- src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c b/src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c index b0e50ed..e22ef19 100644 --- a/src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c +++ b/src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c @@ -383,6 +383,15 @@ static void establish(fastd_context *ctx, fastd_peer *peer, const fastd_peer_con peer->protocol_state->session.receive_nonce[i] = 0; } + if (initiator) { + free_handshake(peer->protocol_state->initiating_handshake); + peer->protocol_state->initiating_handshake = NULL; + } + else { + free_handshake(peer->protocol_state->accepting_handshake); + peer->protocol_state->accepting_handshake = NULL; + } + fastd_peer_seen(ctx, peer); if (peer_config != peer->config) { -- cgit v1.2.3