summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2008-06-25 11:13:44 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2008-06-25 11:13:44 +0000
commitf5098f6ba5faf25dffd95f20bb27d49208f3c9ef (patch)
tree66ed9f56802b6e8a823b3985111206c532ec84fa /usr.bin
parentac06d5584759b7866c4ff55ae474c11411611943 (diff)
add key length to visual fingerprint; zap magical constants;
ok grunk@ djm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/key.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index 38cf70ea7f3..d41c2333717 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.76 2008/06/12 22:03:36 grunk Exp $ */
+/* $OpenBSD: key.c,v 1.77 2008/06/25 11:13:43 otto Exp $ */
/*
* read_bignum():
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -374,11 +374,11 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len, const Key *k)
field[x][y] = len;
/* fill in retval */
- snprintf(retval, 10, "+--[%4s]", key_type(k));
+ snprintf(retval, FLDSIZE_X, "+--[%4s %4u]", key_type(k), key_size(k));
p = strchr(retval, '\0');
/* output upper border */
- for (i = 0; i < FLDSIZE_X - 8; i++)
+ for (i = p - retval - 1; i < FLDSIZE_X; i++)
*p++ = '-';
*p++ = '+';
*p++ = '\n';