diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-01 03:44:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-01 03:44:11 +0200 |
commit | 6abadfbe0b3e10fff89579b20e8d3a47f5eafd4d (patch) | |
tree | 10a79e5095f21e1d9ef6b4ef6deb1ae56e12203f /src | |
parent | 9c1a2e4d393f56872f8c7ed5ad14aee5e4863e92 (diff) | |
download | fastd-6abadfbe0b3e10fff89579b20e8d3a47f5eafd4d.tar fastd-6abadfbe0b3e10fff89579b20e8d3a47f5eafd4d.zip |
ecfxp: delete handshake data after handshake is finished
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol_ec25519_fhmqvc_xsalsa20_poly1305.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) { |