summaryrefslogtreecommitdiffhomepage
path: root/cli-kex.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-07-28 16:44:16 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-07-28 16:44:16 +0000
commit2d82f73484e588e9367657a25331afd4aa0bf976 (patch)
treeba72557d5adc76bb9bf156c5e54e29bcd66df9d2 /cli-kex.c
parenta76b1ba06868c1743837a5267efcbf2e07c9d81d (diff)
Client mostly works up to password auth
Need to rework algo-choosing etc, since server is now broken. --HG-- extra : convert_revision : 458dc4eed0e885e7c91633d4781d3348213a0e19
Diffstat (limited to 'cli-kex.c')
-rw-r--r--cli-kex.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cli-kex.c b/cli-kex.c
index 2577caf..d882423 100644
--- a/cli-kex.c
+++ b/cli-kex.c
@@ -43,7 +43,7 @@ void send_msg_kexdh_init() {
cli_ses.dh_e = (mp_int*)m_malloc(sizeof(mp_int));
cli_ses.dh_x = (mp_int*)m_malloc(sizeof(mp_int));
- m_mp_init_multi(cli_ses.dh_e, cli_ses.dh_x);
+ m_mp_init_multi(cli_ses.dh_e, cli_ses.dh_x, NULL);
gen_kexdh_vals(cli_ses.dh_e, cli_ses.dh_x);
CHECKCLEARTOWRITE();
@@ -58,17 +58,23 @@ void recv_msg_kexdh_reply() {
mp_int dh_f;
sign_key *hostkey = NULL;
- int type;
+ int type, keylen;
+ TRACE(("enter recv_msg_kexdh_reply"));
type = ses.newkeys->algo_hostkey;
+ TRACE(("type is %d", type));
hostkey = new_sign_key();
+ keylen = buf_getint(ses.payload);
+
if (buf_get_pub_key(ses.payload, hostkey, &type) != DROPBEAR_SUCCESS) {
+ TRACE(("failed getting pubkey"));
dropbear_exit("Bad KEX packet");
}
m_mp_init(&dh_f);
if (buf_getmpint(ses.payload, &dh_f) != DROPBEAR_SUCCESS) {
+ TRACE(("failed getting mpint"));
dropbear_exit("Bad KEX packet");
}