=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-add.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/ssh/ssh-add.c 1999/11/14 17:53:48 1.9 +++ src/usr.bin/ssh/ssh-add.c 1999/11/15 20:53:24 1.10 @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$Id: ssh-add.c,v 1.9 1999/11/14 17:53:48 markus Exp $"); +RCSID("$Id: ssh-add.c,v 1.10 1999/11/15 20:53:24 markus Exp $"); #include "rsa.h" #include "ssh.h" @@ -106,33 +106,32 @@ list_identities(AuthenticationConnection *ac) { BIGNUM *e, *n; - int bits, status; + int status; char *comment; int had_identities; e = BN_new(); n = BN_new(); had_identities = 0; - for (status = ssh_get_first_identity(ac, &bits, e, n, &comment); + for (status = ssh_get_first_identity(ac, e, n, &comment); status; - status = ssh_get_next_identity(ac, &bits, e, n, &comment)) + status = ssh_get_next_identity(ac, e, n, &comment)) { - char *buf; + char *ebuf, *nbuf; had_identities = 1; - printf("%d ", bits); - buf = BN_bn2dec(e); - if (buf != NULL) { - printf("%s ", buf); - free (buf); - } else { - error("list_identities: BN_bn2dec #1 failed."); - } - buf = BN_bn2dec(n); - if (buf != NULL) { - printf("%s %s\n", buf, comment); - free (buf); - } else { - error("list_identities: BN_bn2dec #2 failed."); + ebuf = BN_bn2dec(e); + if (ebuf == NULL) { + error("list_identities: BN_bn2dec(e) failed."); + }else{ + nbuf = BN_bn2dec(n); + if (nbuf == NULL) { + error("list_identities: BN_bn2dec(n) failed."); + }else{ + unsigned int bits = BN_num_bits(n); + printf("%d %s %s %s\n", bits, ebuf, nbuf, comment); + free(nbuf); + } + free(ebuf); } xfree(comment); }