version 1.258, 2015/01/26 06:10:03 |
version 1.259, 2015/01/28 22:36:00 |
|
|
if (options.proxy_command == NULL) { |
if (options.proxy_command == NULL) { |
if (getnameinfo(hostaddr, hostaddr->sa_len, |
if (getnameinfo(hostaddr, hostaddr->sa_len, |
ntop, sizeof(ntop), NULL, 0, NI_NUMERICHOST) != 0) |
ntop, sizeof(ntop), NULL, 0, NI_NUMERICHOST) != 0) |
fatal("check_host_key: getnameinfo failed"); |
fatal("%s: getnameinfo failed", __func__); |
*hostfile_ipaddr = put_host_port(ntop, port); |
*hostfile_ipaddr = put_host_port(ntop, port); |
} else { |
} else { |
*hostfile_ipaddr = xstrdup("<no hostip for proxy " |
*hostfile_ipaddr = xstrdup("<no hostip for proxy " |
|
|
"key for IP address '%.128s' to the list " |
"key for IP address '%.128s' to the list " |
"of known hosts.", type, ip); |
"of known hosts.", type, ip); |
} else if (options.visual_host_key) { |
} else if (options.visual_host_key) { |
fp = key_fingerprint(host_key, |
fp = sshkey_fingerprint(host_key, |
options.fingerprint_hash, SSH_FP_DEFAULT); |
options.fingerprint_hash, SSH_FP_DEFAULT); |
ra = key_fingerprint(host_key, |
ra = sshkey_fingerprint(host_key, |
options.fingerprint_hash, SSH_FP_RANDOMART); |
options.fingerprint_hash, SSH_FP_RANDOMART); |
|
if (fp == NULL || ra == NULL) |
|
fatal("%s: sshkey_fingerprint fail", __func__); |
logit("Host key fingerprint is %s\n%s\n", fp, ra); |
logit("Host key fingerprint is %s\n%s\n", fp, ra); |
free(ra); |
free(ra); |
free(fp); |
free(fp); |
|
|
else |
else |
snprintf(msg1, sizeof(msg1), "."); |
snprintf(msg1, sizeof(msg1), "."); |
/* The default */ |
/* The default */ |
fp = key_fingerprint(host_key, |
fp = sshkey_fingerprint(host_key, |
options.fingerprint_hash, SSH_FP_DEFAULT); |
options.fingerprint_hash, SSH_FP_DEFAULT); |
ra = key_fingerprint(host_key, |
ra = sshkey_fingerprint(host_key, |
options.fingerprint_hash, SSH_FP_RANDOMART); |
options.fingerprint_hash, SSH_FP_RANDOMART); |
|
if (fp == NULL || ra == NULL) |
|
fatal("%s: sshkey_fingerprint fail", __func__); |
msg2[0] = '\0'; |
msg2[0] = '\0'; |
if (options.verify_host_key_dns) { |
if (options.verify_host_key_dns) { |
if (matching_host_key_dns) |
if (matching_host_key_dns) |
|
|
continue; |
continue; |
if (!lookup_key_in_hostkeys_by_type(hostkeys, type[i], &found)) |
if (!lookup_key_in_hostkeys_by_type(hostkeys, type[i], &found)) |
continue; |
continue; |
fp = key_fingerprint(found->key, |
fp = sshkey_fingerprint(found->key, |
options.fingerprint_hash, SSH_FP_DEFAULT); |
options.fingerprint_hash, SSH_FP_DEFAULT); |
ra = key_fingerprint(found->key, |
ra = sshkey_fingerprint(found->key, |
options.fingerprint_hash, SSH_FP_RANDOMART); |
options.fingerprint_hash, SSH_FP_RANDOMART); |
|
if (fp == NULL || ra == NULL) |
|
fatal("%s: sshkey_fingerprint fail", __func__); |
logit("WARNING: %s key found for host %s\n" |
logit("WARNING: %s key found for host %s\n" |
"in %s:%lu\n" |
"in %s:%lu\n" |
"%s key fingerprint %s.", |
"%s key fingerprint %s.", |
|
|
{ |
{ |
char *fp; |
char *fp; |
|
|
fp = key_fingerprint(host_key, options.fingerprint_hash, |
fp = sshkey_fingerprint(host_key, options.fingerprint_hash, |
SSH_FP_DEFAULT); |
SSH_FP_DEFAULT); |
|
if (fp == NULL) |
|
fatal("%s: sshkey_fingerprint fail", __func__); |
|
|
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |
error("@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @"); |