From 267e28bb75e97755ab3bbe128b75623734f2b3fd Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 13 Jun 2008 04:48:11 +1000 Subject: [PATCH] - otto@cvs.openbsd.org 2008/06/12 00:13:13 [key.c] use an odd number of rows and columns and a separate start marker, looks better; ok grunk@ --- ChangeLog | 6 +++++- key.c | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83b74d13b..27a2a7abc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,6 +64,10 @@ [sshconnect.c] Make ssh print the random art also when ssh'ing to a host using IP only. spotted by naddy@, ok and help djm@ dtucker@ + - otto@cvs.openbsd.org 2008/06/12 00:13:13 + [key.c] + use an odd number of rows and columns and a separate start marker, looks + better; ok grunk@ 20080611 - (djm) [channels.c configure.ac] @@ -4226,4 +4230,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4975 2008/06/12 18:47:34 dtucker Exp $ +$Id: ChangeLog,v 1.4976 2008/06/12 18:48:11 dtucker Exp $ diff --git a/key.c b/key.c index ef047463b..1f27926d1 100644 --- a/key.c +++ b/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 , Espoo, Finland @@ -319,8 +319,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) { @@ -328,7 +328,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; @@ -341,7 +341,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++) { @@ -364,6 +363,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;