[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.220 and 1.221

version 1.220, 2012/12/03 00:14:06 version 1.221, 2013/01/03 23:22:58
Line 710 
Line 710 
 #ifdef ENABLE_PKCS11  #ifdef ENABLE_PKCS11
         Key **keys = NULL;          Key **keys = NULL;
         int i, nkeys;          int i, nkeys;
           enum fp_rep rep;
           enum fp_type fptype;
           char *fp, *ra;
   
         pkcs11_init(0);          pkcs11_init(0);
         nkeys = pkcs11_add_provider(pkcs11provider, NULL, &keys);          nkeys = pkcs11_add_provider(pkcs11provider, NULL, &keys);
         if (nkeys <= 0)          if (nkeys <= 0)
                 fatal("cannot read public key from pkcs11");                  fatal("cannot read public key from pkcs11");
         for (i = 0; i < nkeys; i++) {          for (i = 0; i < nkeys; i++) {
                 key_write(keys[i], stdout);                  if (print_fingerprint) {
                           fp = key_fingerprint(keys[i], fptype, rep);
                           ra = key_fingerprint(keys[i], SSH_FP_MD5,
                               SSH_FP_RANDOMART);
                           printf("%u %s %s (PKCS11 key)\n", key_size(keys[i]),
                               fp, key_type(keys[i]));
                           if (log_level >= SYSLOG_LEVEL_VERBOSE)
                                   printf("%s\n", ra);
                           xfree(ra);
                           xfree(fp);
                   } else {
                           key_write(keys[i], stdout);
                           fprintf(stdout, "\n");
                   }
                 key_free(keys[i]);                  key_free(keys[i]);
                 fprintf(stdout, "\n");  
         }          }
         xfree(keys);          xfree(keys);
         pkcs11_terminate();          pkcs11_terminate();
Line 2158 
Line 2173 
                 usage();                  usage();
         }          }
         if (print_fingerprint && (delete_host || hash_hosts)) {          if (print_fingerprint && (delete_host || hash_hosts)) {
                 printf("Cannot use -l with -D or -R.\n");                  printf("Cannot use -l with -H or -R.\n");
                 usage();                  usage();
         }          }
         if (ca_key_path != NULL) {          if (ca_key_path != NULL) {
Line 2170 
Line 2185 
                 do_show_cert(pw);                  do_show_cert(pw);
         if (delete_host || hash_hosts || find_host)          if (delete_host || hash_hosts || find_host)
                 do_known_hosts(pw, rr_hostname);                  do_known_hosts(pw, rr_hostname);
           if (pkcs11provider != NULL)
                   do_download(pw);
         if (print_fingerprint || print_bubblebabble)          if (print_fingerprint || print_bubblebabble)
                 do_fingerprint(pw);                  do_fingerprint(pw);
         if (change_passphrase)          if (change_passphrase)
Line 2207 
Line 2224 
                         exit(0);                          exit(0);
                 }                  }
         }          }
         if (pkcs11provider != NULL)  
                 do_download(pw);  
   
         if (do_gen_candidates) {          if (do_gen_candidates) {
                 FILE *out = fopen(out_file, "w");                  FILE *out = fopen(out_file, "w");

Legend:
Removed from v.1.220  
changed lines
  Added in v.1.221