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

Collapse All | Expand All

(-)a/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
(-)a/ssh-keygen.c (-1 / +9 lines)
Lines 1174-1180 known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx) Link Here
1174
	struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
1174
	struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
1175
	enum sshkey_fp_rep rep;
1175
	enum sshkey_fp_rep rep;
1176
	int fptype;
1176
	int fptype;
1177
	char *fp;
1177
	char *fp = NULL, *ra = NULL;
1178
1178
1179
	fptype = print_bubblebabble ? SSH_DIGEST_SHA1 : fingerprint_hash;
1179
	fptype = print_bubblebabble ? SSH_DIGEST_SHA1 : fingerprint_hash;
1180
	rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_DEFAULT;
1180
	rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_DEFAULT;
Lines 1208-1215 known_hosts_find_delete(struct hostkey_foreach_line *l, void *_ctx) Link Here
1208
				known_hosts_hash(l, ctx);
1208
				known_hosts_hash(l, ctx);
1209
			else if (print_fingerprint) {
1209
			else if (print_fingerprint) {
1210
				fp = sshkey_fingerprint(l->key, fptype, rep);
1210
				fp = sshkey_fingerprint(l->key, fptype, rep);
1211
				ra = sshkey_fingerprint(l->key,
1212
				    fingerprint_hash, SSH_FP_RANDOMART);
1213
				if (fp == NULL || ra == NULL)
1214
					fatal("%s: sshkey_fingerprint failed",
1215
					    __func__);
1211
				mprintf("%s %s %s %s\n", ctx->host,
1216
				mprintf("%s %s %s %s\n", ctx->host,
1212
				    sshkey_type(l->key), fp, l->comment);
1217
				    sshkey_type(l->key), fp, l->comment);
1218
				if (log_level_get() >= SYSLOG_LEVEL_VERBOSE)
1219
					printf("%s\n", ra);
1220
				free(ra);
1213
				free(fp);
1221
				free(fp);
1214
			} else
1222
			} else
1215
				fprintf(ctx->out, "%s\n", l->line);
1223
				fprintf(ctx->out, "%s\n", l->line);

Return to bug 3003