[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.10 and 1.11

version 1.10, 1999/11/15 20:53:24 version 1.11, 1999/11/16 22:49:28
Line 20 
Line 20 
 #include "ssh.h"  #include "ssh.h"
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "authfd.h"  #include "authfd.h"
   #include "fingerprint.h"
   
 void  void
 delete_file(AuthenticationConnection *ac, const char *filename)  delete_file(AuthenticationConnection *ac, const char *filename)
Line 103 
Line 104 
 }  }
   
 void  void
 list_identities(AuthenticationConnection *ac)  list_identities(AuthenticationConnection *ac, int fp)
 {  {
   BIGNUM *e, *n;    BIGNUM *e, *n;
   int status;    int status;
Line 117 
Line 118 
        status;         status;
        status = ssh_get_next_identity(ac, e, n, &comment))         status = ssh_get_next_identity(ac, e, n, &comment))
     {      {
       char *ebuf, *nbuf;        unsigned int bits = BN_num_bits(n);
       had_identities = 1;        had_identities = 1;
       ebuf = BN_bn2dec(e);        if (fp) {
       if (ebuf == NULL) {          printf("%d %s %s\n", bits, fingerprint(e, n), comment);
         error("list_identities: BN_bn2dec(e) failed.");        } else {
       }else{          char *ebuf, *nbuf;
         nbuf = BN_bn2dec(n);          ebuf = BN_bn2dec(e);
         if (nbuf == NULL) {          if (ebuf == NULL) {
           error("list_identities: BN_bn2dec(n) failed.");            error("list_identities: BN_bn2dec(e) failed.");
         }else{          }else{
           unsigned int bits = BN_num_bits(n);            nbuf = BN_bn2dec(n);
           printf("%d %s %s %s\n", bits, ebuf, nbuf, comment);            if (nbuf == NULL) {
           free(nbuf);              error("list_identities: BN_bn2dec(n) failed.");
         }            }else{
         free(ebuf);              printf("%d %s %s %s\n", bits, ebuf, nbuf, comment);
               free(nbuf);
             }
             free(ebuf);
           }
       }        }
       xfree(comment);        xfree(comment);
     }      }
Line 170 
Line 175 
   
   for (i = 1; i < argc; i++)    for (i = 1; i < argc; i++)
     {      {
       if (strcmp(argv[i], "-l") == 0)        if ((strcmp(argv[i], "-l") == 0) ||
             (strcmp(argv[i], "-L") == 0))
         {          {
           list_identities(ac);            list_identities(ac, argv[i][1] == 'l' ? 1 : 0);
           no_files = 0; /* Don't default-add/delete if -l. */            no_files = 0; /* Don't default-add/delete if -l. */
           continue;            continue;
         }          }

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