summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2012-10-05 10:42:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2012-10-05 10:42:53 +1000
commit302889a1b0db42d8065fa882ae8e06ca2ff75477 (patch)
treed78e8c284ffc63964d71cb12f6dec3ce88e7cf69 /packet.c
parent0af2405ebf4d4c3b420740f0fb5b81aca7039bdc (diff)
- markus@cvs.openbsd.org 2012/09/17 13:04:11
[packet.c] clear old keys on rekeing; ok djm
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index d0c66fe57..b75c081f0 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.176 2012/01/25 19:40:09 markus Exp $ */ 1/* $OpenBSD: packet.c,v 1.177 2012/09/17 13:04:11 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -757,6 +757,9 @@ set_newkeys(int mode)
757 mac = &active_state->newkeys[mode]->mac; 757 mac = &active_state->newkeys[mode]->mac;
758 comp = &active_state->newkeys[mode]->comp; 758 comp = &active_state->newkeys[mode]->comp;
759 mac_clear(mac); 759 mac_clear(mac);
760 memset(enc->iv, 0, enc->block_size);
761 memset(enc->key, 0, enc->key_len);
762 memset(mac->key, 0, mac->key_len);
760 xfree(enc->name); 763 xfree(enc->name);
761 xfree(enc->iv); 764 xfree(enc->iv);
762 xfree(enc->key); 765 xfree(enc->key);