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

Diff for /src/usr.bin/ssh/ssh-keygen.c between version 1.166 and 1.167

version 1.166, 2008/05/19 15:46:31 version 1.167, 2008/06/11 21:01:35
Line 496 
Line 496 
 {  {
         FILE *f;          FILE *f;
         Key *public;          Key *public;
         char *comment = NULL, *cp, *ep, line[16*1024], *fp;          char *comment = NULL, *cp, *ep, line[16*1024], *fp, *ra;
         int i, skip = 0, num = 0, invalid = 1;          int i, skip = 0, num = 0, invalid = 1;
         enum fp_rep rep;          enum fp_rep rep;
         enum fp_type fptype;          enum fp_type fptype;
Line 514 
Line 514 
         public = key_load_public(identity_file, &comment);          public = key_load_public(identity_file, &comment);
         if (public != NULL) {          if (public != NULL) {
                 fp = key_fingerprint(public, fptype, rep);                  fp = key_fingerprint(public, fptype, rep);
                   ra = key_fingerprint(public, fptype, rep);
                 printf("%u %s %s\n", key_size(public), fp, comment);                  printf("%u %s %s\n", key_size(public), fp, comment);
                   verbose("%s\n", ra);
                 key_free(public);                  key_free(public);
                 xfree(comment);                  xfree(comment);
                   xfree(ra);
                 xfree(fp);                  xfree(fp);
                 exit(0);                  exit(0);
         }          }
Line 574 
Line 577 
                         }                          }
                         comment = *cp ? cp : comment;                          comment = *cp ? cp : comment;
                         fp = key_fingerprint(public, fptype, rep);                          fp = key_fingerprint(public, fptype, rep);
                           ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
                         printf("%u %s %s\n", key_size(public), fp,                          printf("%u %s %s\n", key_size(public), fp,
                             comment ? comment : "no comment");                              comment ? comment : "no comment");
                           verbose("%s\n", ra);
                           xfree(ra);
                         xfree(fp);                          xfree(fp);
                         key_free(public);                          key_free(public);
                         invalid = 0;                          invalid = 0;
Line 595 
Line 601 
         if (print_fingerprint) {          if (print_fingerprint) {
                 enum fp_rep rep;                  enum fp_rep rep;
                 enum fp_type fptype;                  enum fp_type fptype;
                 char *fp;                  char *fp, *ra;
   
                 fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5;                  fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5;
                 rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;                  rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;
                 fp = key_fingerprint(public, fptype, rep);                  fp = key_fingerprint(public, fptype, rep);
                 printf("%u %s %s\n", key_size(public), fp, name);                  ra = key_fingerprint(public, fptype, SSH_FP_RANDOMART);
                   printf("%u %s %s\n%s\n", key_size(public), fp, name, ra);
                   xfree(ra);
                 xfree(fp);                  xfree(fp);
         } else {          } else {
                 if (hash && (name = host_hash(name, NULL, 0)) == NULL)                  if (hash && (name = host_hash(name, NULL, 0)) == NULL)
Line 1438 
Line 1446 
   
         if (!quiet) {          if (!quiet) {
                 char *fp = key_fingerprint(public, SSH_FP_MD5, SSH_FP_HEX);                  char *fp = key_fingerprint(public, SSH_FP_MD5, SSH_FP_HEX);
                   char *ra = key_fingerprint(public, SSH_FP_MD5,
                       SSH_FP_RANDOMART);
                 printf("Your public key has been saved in %s.\n",                  printf("Your public key has been saved in %s.\n",
                     identity_file);                      identity_file);
                 printf("The key fingerprint is:\n");                  printf("The key fingerprint is:\n");
                 printf("%s %s\n", fp, comment);                  printf("%s %s\n", fp, comment);
                   printf("The key's randomart image is:\n");
                   printf("%s\n", ra);
                   xfree(ra);
                 xfree(fp);                  xfree(fp);
         }          }
   

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167