comparison common-kex.c @ 79:5a55bd66707f

- don't crash when trying to add to known_hosts if it doesn't exist - comments
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Aug 2004 08:59:11 +0000
parents e3adf4cf5465
children 29a5c7c62350
comparison
equal deleted inserted replaced
78:677843bfa734 79:5a55bd66707f
462 TRACE(("leave recv_msg_kexinit")); 462 TRACE(("leave recv_msg_kexinit"));
463 } 463 }
464 464
465 /* Initialises and generate one side of the diffie-hellman key exchange values. 465 /* Initialises and generate one side of the diffie-hellman key exchange values.
466 * See the ietf-secsh-transport draft, section 6, for details */ 466 * See the ietf-secsh-transport draft, section 6, for details */
467 /* dh_pub and dh_priv will be initialised by this function, and should be
468 * mp_clear()ed after finished */
467 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) { 469 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) {
468 470
469 mp_int dh_p, dh_q, dh_g; 471 mp_int dh_p, dh_q, dh_g;
470 unsigned char randbuf[DH_P_LEN]; 472 unsigned char randbuf[DH_P_LEN];
471 int dh_q_len; 473 int dh_q_len;