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) |
- 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 @@ | |||
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'; |