=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/key.c,v retrieving revision 1.49.2.2 retrieving revision 1.50 diff -u -r1.49.2.2 -r1.50 --- src/usr.bin/ssh/Attic/key.c 2003/09/16 21:20:26 1.49.2.2 +++ src/usr.bin/ssh/Attic/key.c 2003/02/04 09:32:08 1.50 @@ -32,13 +32,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.49.2.2 2003/09/16 21:20:26 brad Exp $"); +RCSID("$OpenBSD: key.c,v 1.50 2003/02/04 09:32:08 markus Exp $"); #include #include "xmalloc.h" #include "key.h" #include "rsa.h" +#include "ssh-dss.h" +#include "ssh-rsa.h" #include "uuencode.h" #include "buffer.h" #include "bufaux.h" @@ -169,7 +171,7 @@ return 0; } -u_char* +static u_char * key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length) { const EVP_MD *md = NULL; @@ -236,10 +238,8 @@ for (i = 0; i < dgst_raw_len; i++) { char hex[4]; snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]); - strlcat(retval, hex, dgst_raw_len * 3 + 1); + strlcat(retval, hex, dgst_raw_len * 3); } - - /* Remove the trailing ':' character */ retval[(dgst_raw_len * 3) - 1] = '\0'; return retval; } @@ -440,7 +440,7 @@ xfree(blob); return -1; } - k = key_from_blob(blob, (u_int)n); + k = key_from_blob(blob, n); xfree(blob); if (k == NULL) { error("key_read: key_from_blob %s failed", cp); @@ -676,7 +676,7 @@ } Key * -key_from_blob(u_char *blob, u_int blen) +key_from_blob(u_char *blob, int blen) { Buffer b; char *ktype;