version 1.13, 2019/01/19 21:43:56 |
version 1.14, 2019/01/21 09:55:52 |
|
|
hash, &hashlen)) < 0) |
hash, &hashlen)) < 0) |
goto out; |
goto out; |
|
|
/* save session id := H */ |
|
if (kex->session_id == NULL) { |
|
kex->session_id_len = hashlen; |
|
kex->session_id = malloc(kex->session_id_len); |
|
if (kex->session_id == NULL) { |
|
r = SSH_ERR_ALLOC_FAIL; |
|
goto out; |
|
} |
|
memcpy(kex->session_id, hash, kex->session_id_len); |
|
} |
|
|
|
/* sign H */ |
/* sign H */ |
if ((r = kex->sign(ssh, server_host_private, server_host_public, |
if ((r = kex->sign(ssh, server_host_private, server_host_public, |
&signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0) |
&signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0) |