summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-06-29 22:45:37 +1000
committerDamien Miller <djm@mindrot.org>2008-06-29 22:45:37 +1000
commit007132a7c92e603ffb76862cedb28f3165582731 (patch)
tree9d2bed885a512fc0e335d1cf2cb7b763af597635
parentf184bcf89e0925921583f857858871fdf81ce337 (diff)
- otto@cvs.openbsd.org 2008/06/25 11:13:43
[key.c] add key length to visual fingerprint; zap magical constants; ok grunk@ djm@
-rw-r--r--ChangeLog6
-rw-r--r--key.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 892eb90de..5cde1b698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
4 [sftp.c] 4 [sftp.c]
5 use optopt to get invalid flag, instead of return value of getopt, 5 use optopt to get invalid flag, instead of return value of getopt,
6 which is always '?'; ok djm@ 6 which is always '?'; ok djm@
7 - otto@cvs.openbsd.org 2008/06/25 11:13:43
8 [key.c]
9 add key length to visual fingerprint; zap magical constants;
10 ok grunk@ djm@
7 11
820080628 1220080628
9 - (djm) [RFC.nroff contrib/cygwin/Makefile contrib/suse/openssh.spec] 13 - (djm) [RFC.nroff contrib/cygwin/Makefile contrib/suse/openssh.spec]
@@ -4424,4 +4428,4 @@
4424 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4428 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4425 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4429 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4426 4430
4427$Id: ChangeLog,v 1.5025 2008/06/29 12:45:13 djm Exp $ 4431$Id: ChangeLog,v 1.5026 2008/06/29 12:45:37 djm Exp $
diff --git a/key.c b/key.c
index f981710a7..515103cb4 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.76 2008/06/12 22:03:36 grunk Exp $ */ 1/* $OpenBSD: key.c,v 1.77 2008/06/25 11:13:43 otto Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -378,11 +378,11 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len, const Key *k)
378 field[x][y] = len; 378 field[x][y] = len;
379 379
380 /* fill in retval */ 380 /* fill in retval */
381 snprintf(retval, 10, "+--[%4s]", key_type(k)); 381 snprintf(retval, FLDSIZE_X, "+--[%4s %4u]", key_type(k), key_size(k));
382 p = strchr(retval, '\0'); 382 p = strchr(retval, '\0');
383 383
384 /* output upper border */ 384 /* output upper border */
385 for (i = 0; i < FLDSIZE_X - 8; i++) 385 for (i = p - retval - 1; i < FLDSIZE_X; i++)
386 *p++ = '-'; 386 *p++ = '-';
387 *p++ = '+'; 387 *p++ = '+';
388 *p++ = '\n'; 388 *p++ = '\n';