version 1.7, 2006/08/03 03:34:42 |
version 1.8, 2006/10/31 16:33:12 |
|
|
DH *dh; |
DH *dh; |
Key *server_host_key; |
Key *server_host_key; |
u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; |
u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL; |
u_int sbloblen, klen, kout, hashlen; |
u_int sbloblen, klen, hashlen, slen; |
u_int slen; |
int kout; |
|
|
/* generate server DH public key */ |
/* generate server DH public key */ |
switch (kex->kex_type) { |
switch (kex->kex_type) { |
|
|
|
|
klen = DH_size(dh); |
klen = DH_size(dh); |
kbuf = xmalloc(klen); |
kbuf = xmalloc(klen); |
kout = DH_compute_key(kbuf, dh_client_pub, dh); |
if ((kout = DH_compute_key(kbuf, dh_client_pub, dh)) < 0) |
|
fatal("DH_compute_key: failed"); |
#ifdef DEBUG_KEXDH |
#ifdef DEBUG_KEXDH |
dump_digest("shared secret", kbuf, kout); |
dump_digest("shared secret", kbuf, kout); |
#endif |
#endif |