diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-04-06 23:18:26 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-04-06 23:18:26 +0800 |
commit | 7dc2f36c3e2d21455ae432da4d8f338e7dc0668c (patch) | |
tree | e09030cf950dca1c4a9b7a3e1cd8f633490570a9 /cli-kex.c | |
parent | 90cfbe1f7a8138225c08a43a62ffe5a064a6297e (diff) |
use sigtype where appropriate
Diffstat (limited to 'cli-kex.c')
-rw-r--r-- | cli-kex.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -94,7 +94,7 @@ void send_msg_kexdh_init() { void recv_msg_kexdh_reply() { sign_key *hostkey = NULL; - unsigned int type, keybloblen; + unsigned int keytype, keybloblen; unsigned char* keyblob = NULL; TRACE(("enter recv_msg_kexdh_reply")) @@ -102,8 +102,8 @@ void recv_msg_kexdh_reply() { if (cli_ses.kex_state != KEXDH_INIT_SENT) { dropbear_exit("Received out-of-order kexdhreply"); } - type = ses.newkeys->algo_hostkey; - TRACE(("type is %d", type)) + keytype = ses.newkeys->algo_hostkey; + TRACE(("keytype is %d", keytype)) hostkey = new_sign_key(); keybloblen = buf_getint(ses.payload); @@ -114,7 +114,7 @@ void recv_msg_kexdh_reply() { checkhostkey(keyblob, keybloblen); } - if (buf_get_pub_key(ses.payload, hostkey, &type) != DROPBEAR_SUCCESS) { + if (buf_get_pub_key(ses.payload, hostkey, &keytype) != DROPBEAR_SUCCESS) { TRACE(("failed getting pubkey")) dropbear_exit("Bad KEX packet"); } @@ -173,7 +173,8 @@ void recv_msg_kexdh_reply() { #endif cli_ses.param_kex_algo = NULL; - if (buf_verify(ses.payload, hostkey, ses.hash) != DROPBEAR_SUCCESS) { + if (buf_verify(ses.payload, hostkey, ses.newkeys->algo_signature, + ses.hash) != DROPBEAR_SUCCESS) { dropbear_exit("Bad hostkey signature"); } |