changeset 1607:0bdbb9ecc403

avoid leak of ecdh public key
author Matt Johnston <matt@ucc.asn.au>
date Thu, 08 Mar 2018 23:51:33 +0800
parents 98d2b125eb89
children 97335566a3bb
files common-kex.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/common-kex.c	Thu Mar 08 23:23:19 2018 +0800
+++ b/common-kex.c	Thu Mar 08 23:51:33 2018 +0800
@@ -694,6 +694,9 @@
 	/* K, the shared secret */
 	buf_putmpint(ses.kexhashbuf, ses.dh_K);
 
+	ecc_free(Q_them);
+	m_free(Q_them);
+
 	/* calculate the hash H to sign */
 	finish_kexhashbuf();
 }