version 1.18, 2001/01/21 19:05:49 |
version 1.19, 2001/02/04 15:32:23 |
|
|
|
|
debug("send KEXINIT"); |
debug("send KEXINIT"); |
packet_start(SSH2_MSG_KEXINIT); |
packet_start(SSH2_MSG_KEXINIT); |
packet_put_raw(buffer_ptr(my_kexinit), buffer_len(my_kexinit)); |
packet_put_raw(buffer_ptr(my_kexinit), buffer_len(my_kexinit)); |
packet_send(); |
packet_send(); |
packet_write_wait(); |
packet_write_wait(); |
debug("done"); |
debug("done"); |
|
|
buffer_put_bignum2(&b, client_dh_pub); |
buffer_put_bignum2(&b, client_dh_pub); |
buffer_put_bignum2(&b, server_dh_pub); |
buffer_put_bignum2(&b, server_dh_pub); |
buffer_put_bignum2(&b, shared_secret); |
buffer_put_bignum2(&b, shared_secret); |
|
|
#ifdef DEBUG_KEX |
#ifdef DEBUG_KEX |
buffer_dump(&b); |
buffer_dump(&b); |
#endif |
#endif |
|
|
buffer_put_bignum2(&b, client_dh_pub); |
buffer_put_bignum2(&b, client_dh_pub); |
buffer_put_bignum2(&b, server_dh_pub); |
buffer_put_bignum2(&b, server_dh_pub); |
buffer_put_bignum2(&b, shared_secret); |
buffer_put_bignum2(&b, shared_secret); |
|
|
#ifdef DEBUG_KEX |
#ifdef DEBUG_KEX |
buffer_dump(&b); |
buffer_dump(&b); |
#endif |
#endif |
|
|
c = cp = xstrdup(client); |
c = cp = xstrdup(client); |
s = sp = xstrdup(server); |
s = sp = xstrdup(server); |
|
|
for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0'; |
for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0'; |
(p = strsep(&sp, SEP)), i++) { |
(p = strsep(&sp, SEP)), i++) { |
if (i < MAX_PROP) |
if (i < MAX_PROP) |
sproposals[i] = p; |
sproposals[i] = p; |
|
|
} |
} |
nproposals = i; |
nproposals = i; |
|
|
for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; |
for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; |
(p = strsep(&cp, SEP)), i++) { |
(p = strsep(&cp, SEP)), i++) { |
for (j = 0; j < nproposals; j++) { |
for (j = 0; j < nproposals; j++) { |
if (strcmp(p, sproposals[j]) == 0) { |
if (strcmp(p, sproposals[j]) == 0) { |