Mercurial > dropbear
comparison svr-kex.c @ 84:29a5c7c62350
default initialisers for mp_ints
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 17 Aug 2004 10:20:20 +0000 |
parents | e3adf4cf5465 |
children | 0cfba3034be5 |
comparison
equal
deleted
inserted
replaced
83:6539c9480b23 | 84:29a5c7c62350 |
---|---|
42 * calculating a session key reply value, and corresponding hash. These | 42 * calculating a session key reply value, and corresponding hash. These |
43 * are carried out by send_msg_kexdh_reply(). recv_msg_kexdh_init() calls | 43 * are carried out by send_msg_kexdh_reply(). recv_msg_kexdh_init() calls |
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 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 } |
69 * result is sent to the client. | 69 * result is sent to the client. |
70 * | 70 * |
71 * See the ietf-secsh-transport draft, section 6, for details */ | 71 * See the ietf-secsh-transport draft, section 6, for details */ |
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 mp_int dh_y, dh_f; | 74 DEF_MP_INT(dh_y); |
75 DEF_MP_INT(dh_f); | |
75 | 76 |
76 TRACE(("enter send_msg_kexdh_reply")); | 77 TRACE(("enter send_msg_kexdh_reply")); |
78 m_mp_init_multi(&dh_y, &dh_f, NULL); | |
77 | 79 |
78 gen_kexdh_vals(&dh_f, &dh_y); | 80 gen_kexdh_vals(&dh_f, &dh_y); |
79 | 81 |
80 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); |
81 mp_clear(&dh_y); | 83 mp_clear(&dh_y); |