diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-06-12 00:13:14 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2008-06-12 00:13:14 +0000 |
commit | 31fbe62da5faf2f128bbaa1f4b20be3060b66560 (patch) | |
tree | 8882d6e0cf22a7529f4377ddb7614aac897fa43a /usr.bin/ssh | |
parent | 717425ddbff45023f1d3a4ae9746999b6f122d2d (diff) |
use an odd number of rows and columns and a separate start marker, looks
better; ok grunk@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/key.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index 01e3a382eff..2a8bae539c1 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.72 2008/06/11 23:51:57 grunk Exp $ */ +/* $OpenBSD: key.c,v 1.73 2008/06/12 00:13:13 otto Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -315,8 +315,8 @@ key_fingerprint_bubblebabble(u_char *dgst_raw, u_int dgst_raw_len) * Graphs are not unambiguous, because circles in graphs can be * walked in either direction. */ -#define FLDSIZE_Y 8 -#define FLDSIZE_X (FLDSIZE_Y * 2) +#define FLDSIZE_Y (8 + 1) +#define FLDSIZE_X (8 * 2 + 1) static char * key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) { @@ -324,7 +324,7 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) * Chars to be used after each other every time the worm * intersects with itself. Matter of taste. */ - char *augmentation_string = " .o+=*BOX@%&#/^"; + char *augmentation_string = " .o+=*BOX@%&#/^S"; char *retval, *p; u_char field[FLDSIZE_X][FLDSIZE_Y]; u_int i, b; @@ -337,7 +337,6 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) memset(field, 0, FLDSIZE_X * FLDSIZE_Y * sizeof(char)); x = FLDSIZE_X / 2; y = FLDSIZE_Y / 2; - field[x][y] = 1; /* process raw key */ for (i = 0; i < dgst_raw_len; i++) { @@ -360,6 +359,7 @@ key_fingerprint_randomart(u_char *dgst_raw, u_int dgst_raw_len) input = input >> 2; } } + field[FLDSIZE_X / 2][FLDSIZE_Y / 2] = len; /* fill in retval */ p = retval; |