=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-add.c,v retrieving revision 1.22.2.2 retrieving revision 1.22.2.3 diff -u -r1.22.2.2 -r1.22.2.3 --- src/usr.bin/ssh/ssh-add.c 2001/02/19 17:19:26 1.22.2.2 +++ src/usr.bin/ssh/ssh-add.c 2001/03/21 19:46:29 1.22.2.3 @@ -11,7 +11,7 @@ * called by a name other than "ssh" or "Secure Shell". * * SSH2 implementation, - * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 2000 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.22.2.2 2001/02/19 17:19:26 jason Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.22.2.3 2001/03/21 19:46:29 jason Exp $"); #include @@ -205,10 +205,10 @@ } void -list_identities(AuthenticationConnection *ac, int fp) +list_identities(AuthenticationConnection *ac, int do_fp) { Key *key; - char *comment; + char *comment, *fp; int had_identities = 0; int version; @@ -217,10 +217,12 @@ key != NULL; key = ssh_get_next_identity(ac, &comment, version)) { had_identities = 1; - if (fp) { + if (do_fp) { + fp = key_fingerprint(key, SSH_FP_MD5, + SSH_FP_HEX); printf("%d %s %s (%s)\n", - key_size(key), key_fingerprint(key), - comment, key_type(key)); + key_size(key), fp, comment, key_type(key)); + xfree(fp); } else { if (!key_write(key, stdout)) fprintf(stderr, "key_write failed");