[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.165 and 1.166

version 1.165, 2008/01/19 22:37:19 version 1.166, 2008/05/19 15:46:31
Line 592 
Line 592 
 static void  static void
 print_host(FILE *f, const char *name, Key *public, int hash)  print_host(FILE *f, const char *name, Key *public, int hash)
 {  {
         if (hash && (name = host_hash(name, NULL, 0)) == NULL)          if (print_fingerprint) {
                 fatal("hash_host failed");                  enum fp_rep rep;
         fprintf(f, "%s ", name);                  enum fp_type fptype;
         if (!key_write(public, f))                  char *fp;
                 fatal("key_write failed");  
         fprintf(f, "\n");                  fptype = print_bubblebabble ? SSH_FP_SHA1 : SSH_FP_MD5;
                   rep =    print_bubblebabble ? SSH_FP_BUBBLEBABBLE : SSH_FP_HEX;
                   fp = key_fingerprint(public, fptype, rep);
                   printf("%u %s %s\n", key_size(public), fp, name);
                   xfree(fp);
           } else {
                   if (hash && (name = host_hash(name, NULL, 0)) == NULL)
                           fatal("hash_host failed");
                   fprintf(f, "%s ", name);
                   if (!key_write(public, f))
                           fatal("key_write failed");
                   fprintf(f, "\n");
           }
 }  }
   
 static void  static void
Line 1216 
Line 1228 
         }          }
         if (change_passphrase && change_comment) {          if (change_passphrase && change_comment) {
                 printf("Can only have one of -p and -c.\n");                  printf("Can only have one of -p and -c.\n");
                   usage();
           }
           if (print_fingerprint && (delete_host || hash_hosts)) {
                   printf("Cannot use -l with -D or -R.\n");
                 usage();                  usage();
         }          }
         if (delete_host || hash_hosts || find_host)          if (delete_host || hash_hosts || find_host)

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