version 1.107, 2017/01/06 03:41:58 |
version 1.108, 2017/03/10 03:18:24 |
|
|
} |
} |
|
|
static void |
static void |
keyprint_one(char *host, struct sshkey *key) |
keyprint_one(const char *host, struct sshkey *key) |
{ |
{ |
char *hostport; |
char *hostport; |
|
const char *known_host, *hashed; |
|
|
if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL) |
|
fatal("host_hash failed"); |
|
|
|
hostport = put_host_port(host, ssh_port); |
hostport = put_host_port(host, ssh_port); |
|
if (hash_hosts && (hashed = host_hash(host, NULL, 0)) == NULL) |
|
fatal("host_hash failed"); |
|
known_host = hash_hosts ? hashed : hostport; |
if (!get_cert) |
if (!get_cert) |
fprintf(stdout, "%s ", hostport); |
fprintf(stdout, "%s ", known_host); |
sshkey_write(key, stdout); |
sshkey_write(key, stdout); |
fputs("\n", stdout); |
fputs("\n", stdout); |
free(hostport); |
free(hostport); |