comparison svr-kex.c @ 165:0cfba3034be5

Fixed DEBUG_TRACE macro so that we don't get semicolons left about the place
author Matt Johnston <matt@ucc.asn.au>
date Sun, 02 Jan 2005 20:25:56 +0000
parents 29a5c7c62350
children 454a34b2dfd1
comparison
equal deleted inserted replaced
161:b9d3f725e00b 165:0cfba3034be5
44 * that function, then brings the new keys into use */ 44 * that function, then brings the new keys into use */
45 void recv_msg_kexdh_init() { 45 void recv_msg_kexdh_init() {
46 46
47 DEF_MP_INT(dh_e); 47 DEF_MP_INT(dh_e);
48 48
49 TRACE(("enter recv_msg_kexdh_init")); 49 TRACE(("enter recv_msg_kexdh_init"))
50 if (!ses.kexstate.recvkexinit) { 50 if (!ses.kexstate.recvkexinit) {
51 dropbear_exit("Premature kexdh_init message received"); 51 dropbear_exit("Premature kexdh_init message received");
52 } 52 }
53 53
54 m_mp_init(&dh_e); 54 m_mp_init(&dh_e);
58 58
59 mp_clear(&dh_e); 59 mp_clear(&dh_e);
60 60
61 send_msg_newkeys(); 61 send_msg_newkeys();
62 ses.requirenext = SSH_MSG_NEWKEYS; 62 ses.requirenext = SSH_MSG_NEWKEYS;
63 TRACE(("leave recv_msg_kexdh_init")); 63 TRACE(("leave recv_msg_kexdh_init"))
64 } 64 }
65 65
66 /* Generate our side of the diffie-hellman key exchange value (dh_f), and 66 /* Generate our side of the diffie-hellman key exchange value (dh_f), and
67 * calculate the session key using the diffie-hellman algorithm. Following 67 * calculate the session key using the diffie-hellman algorithm. Following
68 * that, the session hash is calculated, and signed with RSA or DSS. The 68 * that, the session hash is calculated, and signed with RSA or DSS. The
72 static void send_msg_kexdh_reply(mp_int *dh_e) { 72 static void send_msg_kexdh_reply(mp_int *dh_e) {
73 73
74 DEF_MP_INT(dh_y); 74 DEF_MP_INT(dh_y);
75 DEF_MP_INT(dh_f); 75 DEF_MP_INT(dh_f);
76 76
77 TRACE(("enter send_msg_kexdh_reply")); 77 TRACE(("enter send_msg_kexdh_reply"))
78 m_mp_init_multi(&dh_y, &dh_f, NULL); 78 m_mp_init_multi(&dh_y, &dh_f, NULL);
79 79
80 gen_kexdh_vals(&dh_f, &dh_y); 80 gen_kexdh_vals(&dh_f, &dh_y);
81 81
82 kexdh_comb_key(&dh_f, &dh_y, dh_e, svr_opts.hostkey); 82 kexdh_comb_key(&dh_f, &dh_y, dh_e, svr_opts.hostkey);
97 ses.newkeys->algo_hostkey, ses.hash, SHA1_HASH_SIZE); 97 ses.newkeys->algo_hostkey, ses.hash, SHA1_HASH_SIZE);
98 98
99 /* the SSH_MSG_KEXDH_REPLY is done */ 99 /* the SSH_MSG_KEXDH_REPLY is done */
100 encrypt_packet(); 100 encrypt_packet();
101 101
102 TRACE(("leave send_msg_kexdh_reply")); 102 TRACE(("leave send_msg_kexdh_reply"))
103 } 103 }
104 104