View | Details | Raw Unified | Return to bug 3003 | Differences between
and this patch

Collapse All | Expand All

(-)ssh/ssh-keygen.1 (+1 lines)
Lines 87-92 Link Here
87
.Fl F Ar hostname
87
.Fl F Ar hostname
88
.Op Fl f Ar known_hosts_file
88
.Op Fl f Ar known_hosts_file
89
.Op Fl l
89
.Op Fl l
90
.Op Fl v
90
.Nm ssh-keygen
91
.Nm ssh-keygen
91
.Fl H
92
.Fl H
92
.Op Fl f Ar known_hosts_file
93
.Op Fl f Ar known_hosts_file
(-)ssh/ssh-keygen.c (-1 / +7 lines)
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);

Return to bug 3003