summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--circbuffer.c1
-rw-r--r--common-kex.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/circbuffer.c b/circbuffer.c
index f19b70a..7953737 100644
--- a/circbuffer.c
+++ b/circbuffer.c
@@ -48,6 +48,7 @@ circbuffer * cbuf_new(unsigned int size) {
void cbuf_free(circbuffer * cbuf) {
+ m_burn(cbuf->data, cbuf->size);
m_free(cbuf->data);
m_free(cbuf);
}
diff --git a/common-kex.c b/common-kex.c
index 173bf8c..2b3472b 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -366,6 +366,11 @@ void gen_new_keys() {
ses.keys = ses.newkeys;
ses.newkeys = NULL;
+ m_burn(C2S_IV, sizeof(C2S_IV));
+ m_burn(C2S_key, sizeof(C2S_key));
+ m_burn(S2C_IV, sizeof(S2C_IV));
+ m_burn(S2C_key, sizeof(S2C_key));
+
TRACE(("leave gen_new_keys"))
}