version 1.27, 2001/04/03 23:32:11 |
version 1.28, 2001/04/04 09:48:34 |
|
|
} |
} |
|
|
void |
void |
kex_send_newkeys(void) |
kex_finish(Kex *kex) |
{ |
{ |
|
int i, plen; |
|
|
packet_start(SSH2_MSG_NEWKEYS); |
packet_start(SSH2_MSG_NEWKEYS); |
packet_send(); |
packet_send(); |
/* packet_write_wait(); */ |
/* packet_write_wait(); */ |
debug("SSH2_MSG_NEWKEYS sent"); |
debug("SSH2_MSG_NEWKEYS sent"); |
} |
|
|
|
void |
debug("waiting for SSH2_MSG_NEWKEYS"); |
kex_input_newkeys(int type, int plen, void *ctxt) |
packet_read_expect(&plen, SSH2_MSG_NEWKEYS); |
{ |
|
Kex *kex = ctxt; |
|
int i; |
|
|
|
debug("SSH2_MSG_NEWKEYS received"); |
debug("SSH2_MSG_NEWKEYS received"); |
kex->newkeys = 1; |
kex->newkeys = 1; |
for (i = 30; i <= 49; i++) |
for (i = 30; i <= 49; i++) |
|
|
void |
void |
kex_send_kexinit(Kex *kex) |
kex_send_kexinit(Kex *kex) |
{ |
{ |
|
if (kex->flags & KEX_INIT_SENT) { |
|
debug("KEX_INIT_SENT"); |
|
return; |
|
} |
packet_start(SSH2_MSG_KEXINIT); |
packet_start(SSH2_MSG_KEXINIT); |
packet_put_raw(buffer_ptr(&kex->my), buffer_len(&kex->my)); |
packet_put_raw(buffer_ptr(&kex->my), buffer_len(&kex->my)); |
packet_send(); |
packet_send(); |
|
|
} |
} |
|
|
Kex * |
Kex * |
kex_start(char *proposal[PROPOSAL_MAX]) |
kex_setup(char *proposal[PROPOSAL_MAX]) |
{ |
{ |
Kex *kex; |
Kex *kex; |
int i; |
int i; |
|
|
dispatch_set(i, kex_protocol_error); |
dispatch_set(i, kex_protocol_error); |
|
|
dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); |
dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); |
dispatch_set(SSH2_MSG_NEWKEYS, &kex_input_newkeys); |
|
return kex; |
return kex; |
} |
} |
|
|