version 1.145, 2019/01/21 10:05:09 |
version 1.146, 2019/01/21 10:07:22 |
|
|
return 0; |
return 0; |
} |
} |
|
|
|
int |
|
kex_verify_host_key(struct ssh *ssh, struct sshkey *server_host_key) |
|
{ |
|
struct kex *kex = ssh->kex; |
|
|
|
if (kex->verify_host_key == NULL) |
|
return SSH_ERR_INVALID_ARGUMENT; |
|
if (server_host_key->type != kex->hostkey_type || |
|
(kex->hostkey_type == KEY_ECDSA && |
|
server_host_key->ecdsa_nid != kex->hostkey_nid)) |
|
return SSH_ERR_KEY_TYPE_MISMATCH; |
|
if (kex->verify_host_key(server_host_key, ssh) == -1) |
|
return SSH_ERR_SIGNATURE_INVALID; |
|
return 0; |
|
} |
|
|
#if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) || defined(DEBUG_KEXECDH) |
#if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) || defined(DEBUG_KEXECDH) |
void |
void |
dump_digest(char *msg, u_char *digest, int len) |
dump_digest(char *msg, u_char *digest, int len) |