version 1.138, 2000/12/12 22:30:02 |
version 1.139, 2000/12/15 17:30:14 |
|
|
fatal("Unsupported hostkey type %d", kex->hostkey_type); |
fatal("Unsupported hostkey type %d", kex->hostkey_type); |
|
|
/* KEXDH */ |
/* KEXDH */ |
|
/* generate DH key */ |
|
dh = dh_new_group1(); /* XXX depends on 'kex' */ |
|
dh_gen_key(dh); |
|
|
debug("Wait SSH2_MSG_KEXDH_INIT."); |
debug("Wait SSH2_MSG_KEXDH_INIT."); |
packet_read_expect(&payload_len, SSH2_MSG_KEXDH_INIT); |
packet_read_expect(&payload_len, SSH2_MSG_KEXDH_INIT); |
|
|
|
|
debug("bits %d", BN_num_bits(dh_client_pub)); |
debug("bits %d", BN_num_bits(dh_client_pub)); |
#endif |
#endif |
|
|
/* generate DH key */ |
|
dh = dh_new_group1(); /* XXX depends on 'kex' */ |
|
|
|
#ifdef DEBUG_KEXDH |
#ifdef DEBUG_KEXDH |
fprintf(stderr, "\np= "); |
fprintf(stderr, "\np= "); |
BN_print_fp(stderr, dh->p); |
BN_print_fp(stderr, dh->p); |
|
|
packet_put_bignum2(dh->g); |
packet_put_bignum2(dh->g); |
packet_send(); |
packet_send(); |
packet_write_wait(); |
packet_write_wait(); |
|
|
|
/* Compute our exchange value in parallel with the client */ |
|
|
|
dh_gen_key(dh); |
|
|
debug("Wait SSH2_MSG_KEX_DH_GEX_INIT."); |
debug("Wait SSH2_MSG_KEX_DH_GEX_INIT."); |
packet_read_expect(&payload_len, SSH2_MSG_KEX_DH_GEX_INIT); |
packet_read_expect(&payload_len, SSH2_MSG_KEX_DH_GEX_INIT); |