|
Lines 1153-1159
Link Here
|
| 1153 |
struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx; |
1153 |
struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx; |
| 1154 |
enum sshkey_fp_rep rep; |
1154 |
enum sshkey_fp_rep rep; |
| 1155 |
int fptype; |
1155 |
int fptype; |
| 1156 |
char *fp; |
1156 |
char *fp = NULL, *ra = NULL; |
| 1157 |
|
1157 |
|
| 1158 |
fptype = print_bubblebabble ? SSH_DIGEST_SHA1 : fingerprint_hash; |
1158 |
fptype = print_bubblebabble ? SSH_DIGEST_SHA1 : fingerprint_hash; |
| 1159 |
rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_DEFAULT; |
1159 |
rep = print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_DEFAULT; |
|
Lines 1187-1194
Link Here
|
| 1187 |
known_hosts_hash(l, ctx); |
1187 |
known_hosts_hash(l, ctx); |
| 1188 |
else if (print_fingerprint) { |
1188 |
else if (print_fingerprint) { |
| 1189 |
fp = sshkey_fingerprint(l->key, fptype, rep); |
1189 |
fp = sshkey_fingerprint(l->key, fptype, rep); |
|
|
1190 |
ra = sshkey_fingerprint(l->key, fingerprint_hash, SSH_FP_RANDOMART); |
| 1191 |
if (fp == NULL || ra == NULL) |
| 1192 |
fatal("%s: sshkey_fingerprint failed", __func__); |
| 1190 |
mprintf("%s %s %s %s\n", ctx->host, |
1193 |
mprintf("%s %s %s %s\n", ctx->host, |
| 1191 |
sshkey_type(l->key), fp, l->comment); |
1194 |
sshkey_type(l->key), fp, l->comment); |
|
|
1195 |
if (log_level_get() >= SYSLOG_LEVEL_VERBOSE) |
| 1196 |
printf("%s\n", ra); |
| 1197 |
free(ra); |
| 1192 |
free(fp); |
1198 |
free(fp); |
| 1193 |
} else |
1199 |
} else |
| 1194 |
fprintf(ctx->out, "%s\n", l->line); |
1200 |
fprintf(ctx->out, "%s\n", l->line); |