[BACK]Return to ssh-add.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-add.c between version 1.9 and 1.10

version 1.9, 1999/11/14 17:53:48 version 1.10, 1999/11/15 20:53:24
Line 106 
Line 106 
 list_identities(AuthenticationConnection *ac)  list_identities(AuthenticationConnection *ac)
 {  {
   BIGNUM *e, *n;    BIGNUM *e, *n;
   int bits, status;    int status;
   char *comment;    char *comment;
   int had_identities;    int had_identities;
   
   e = BN_new();    e = BN_new();
   n = BN_new();    n = BN_new();
   had_identities = 0;    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;
        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;        had_identities = 1;
       printf("%d ", bits);        ebuf = BN_bn2dec(e);
       buf = BN_bn2dec(e);        if (ebuf == NULL) {
       if (buf != NULL) {          error("list_identities: BN_bn2dec(e) failed.");
         printf("%s ", buf);        }else{
         free (buf);          nbuf = BN_bn2dec(n);
       } else {          if (nbuf == NULL) {
         error("list_identities: BN_bn2dec #1 failed.");            error("list_identities: BN_bn2dec(n) failed.");
       }          }else{
       buf = BN_bn2dec(n);            unsigned int bits = BN_num_bits(n);
       if (buf != NULL) {            printf("%d %s %s %s\n", bits, ebuf, nbuf, comment);
         printf("%s %s\n", buf, comment);            free(nbuf);
         free (buf);          }
       } else {          free(ebuf);
         error("list_identities: BN_bn2dec #2 failed.");  
       }        }
       xfree(comment);        xfree(comment);
     }      }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10