diff options
author | Damien Miller <djm@mindrot.org> | 2008-06-29 22:45:37 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-06-29 22:45:37 +1000 |
commit | 007132a7c92e603ffb76862cedb28f3165582731 (patch) | |
tree | 9d2bed885a512fc0e335d1cf2cb7b763af597635 /key.c | |
parent | f184bcf89e0925921583f857858871fdf81ce337 (diff) | |
download | openssh-git-007132a7c92e603ffb76862cedb28f3165582731.tar.gz |
- otto@cvs.openbsd.org 2008/06/25 11:13:43
[key.c]
add key length to visual fingerprint; zap magical constants;
ok grunk@ djm@
Diffstat (limited to 'key.c')
-rw-r--r-- | key.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 @@ -378,11 +378,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'; |