diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-03-29 00:28:09 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-03-29 00:28:09 +0800 |
commit | b4bcc606576dab755441da1bc2fbe28041d54b06 (patch) | |
tree | ef133e658f2c87f8cc154a1a8935f2615a60b475 /cli-kex.c | |
parent | 5139bd42f6700333ddfdcdb125e838d10eeaacf4 (diff) |
More changes for KEX and ECDH. Set up hash descriptors, make ECC code work,
ses.hash and ses.session_id are now buffers (doesn't compile)
--HG--
branch : ecc
Diffstat (limited to 'cli-kex.c')
-rw-r--r-- | cli-kex.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -96,12 +96,15 @@ void recv_msg_kexdh_reply() { kexdh_comb_key(cli_ses.dh_param, &dh_f, hostkey); mp_clear(&dh_f); - free_kexdh_param(cli_ses.dh_param); - cli_ses.dh_param = NULL; } else { #ifdef DROPBEAR_ECDH + buffer *ecdh_qs = buf_getstringbuf(ses.payload); + kexecdh_comb_key(cli_ses.dh_param, ecdh_qs, hostkey); + buf_free(ecdh_qs); #endif } + free_kexdh_param(cli_ses.dh_param); + cli_ses.dh_param = NULL; if (buf_verify(ses.payload, hostkey, ses.hash, SHA1_HASH_SIZE) != DROPBEAR_SUCCESS) { |