avoid leak of ecdh public key

This commit is contained in:
Matt Johnston 2018-03-08 23:51:33 +08:00
parent 397af3e6a6
commit 38c9408cf8

View File

@ -694,6 +694,9 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them,
/* 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();
}