[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.257 and 1.260

version 1.257, 2015/01/18 21:51:19 version 1.260, 2015/01/30 00:59:19
Line 706 
Line 706 
                 fatal("%s: unknown key format %d", __func__, convert_format);                  fatal("%s: unknown key format %d", __func__, convert_format);
         }          }
   
         if (!private)          if (!private) {
                 if ((r = sshkey_write(k, stdout)) == 0)                  if ((r = sshkey_write(k, stdout)) == 0)
                         ok = 1;                          ok = 1;
                 if (ok)                  if (ok)
                         fprintf(stdout, "\n");                          fprintf(stdout, "\n");
         else {          } else {
                 switch (k->type) {                  switch (k->type) {
                 case KEY_DSA:                  case KEY_DSA:
                         ok = PEM_write_DSAPrivateKey(stdout, k->dsa, NULL,                          ok = PEM_write_DSAPrivateKey(stdout, k->dsa, NULL,
Line 783 
Line 783 
                         fp = sshkey_fingerprint(keys[i], fptype, rep);                          fp = sshkey_fingerprint(keys[i], fptype, rep);
                         ra = sshkey_fingerprint(keys[i], fingerprint_hash,                          ra = sshkey_fingerprint(keys[i], fingerprint_hash,
                             SSH_FP_RANDOMART);                              SSH_FP_RANDOMART);
                           if (fp == NULL || ra == NULL)
                                   fatal("%s: sshkey_fingerprint fail", __func__);
                         printf("%u %s %s (PKCS11 key)\n", sshkey_size(keys[i]),                          printf("%u %s %s (PKCS11 key)\n", sshkey_size(keys[i]),
                             fp, sshkey_type(keys[i]));                              fp, sshkey_type(keys[i]));
                         if (log_level >= SYSLOG_LEVEL_VERBOSE)                          if (log_level >= SYSLOG_LEVEL_VERBOSE)
Line 829 
Line 831 
                 fp = sshkey_fingerprint(public, fptype, rep);                  fp = sshkey_fingerprint(public, fptype, rep);
                 ra = sshkey_fingerprint(public, fingerprint_hash,                  ra = sshkey_fingerprint(public, fingerprint_hash,
                     SSH_FP_RANDOMART);                      SSH_FP_RANDOMART);
                   if (fp == NULL || ra == NULL)
                           fatal("%s: sshkey_fingerprint fail", __func__);
                 printf("%u %s %s (%s)\n", sshkey_size(public), fp, comment,                  printf("%u %s %s (%s)\n", sshkey_size(public), fp, comment,
                     sshkey_type(public));                      sshkey_type(public));
                 if (log_level >= SYSLOG_LEVEL_VERBOSE)                  if (log_level >= SYSLOG_LEVEL_VERBOSE)
Line 898 
Line 902 
                 fp = sshkey_fingerprint(public, fptype, rep);                  fp = sshkey_fingerprint(public, fptype, rep);
                 ra = sshkey_fingerprint(public, fingerprint_hash,                  ra = sshkey_fingerprint(public, fingerprint_hash,
                     SSH_FP_RANDOMART);                      SSH_FP_RANDOMART);
                   if (fp == NULL || ra == NULL)
                           fatal("%s: sshkey_fingerprint fail", __func__);
                 printf("%u %s %s (%s)\n", sshkey_size(public), fp,                  printf("%u %s %s (%s)\n", sshkey_size(public), fp,
                     comment ? comment : "no comment", sshkey_type(public));                      comment ? comment : "no comment", sshkey_type(public));
                 if (log_level >= SYSLOG_LEVEL_VERBOSE)                  if (log_level >= SYSLOG_LEVEL_VERBOSE)
Line 1114 
Line 1120 
 static void  static void
 do_known_hosts(struct passwd *pw, const char *name)  do_known_hosts(struct passwd *pw, const char *name)
 {  {
         char *cp, tmp[MAXPATHLEN], old[MAXPATHLEN];          char *cp, tmp[PATH_MAX], old[PATH_MAX];
         int r, fd, oerrno, inplace = 0;          int r, fd, oerrno, inplace = 0;
         struct known_hosts_ctx ctx;          struct known_hosts_ctx ctx;
   
Line 1883 
Line 1889 
         key_fp = sshkey_fingerprint(key, fingerprint_hash, SSH_FP_DEFAULT);          key_fp = sshkey_fingerprint(key, fingerprint_hash, SSH_FP_DEFAULT);
         ca_fp = sshkey_fingerprint(key->cert->signature_key,          ca_fp = sshkey_fingerprint(key->cert->signature_key,
             fingerprint_hash, SSH_FP_DEFAULT);              fingerprint_hash, SSH_FP_DEFAULT);
           if (key_fp == NULL || ca_fp == NULL)
                   fatal("%s: sshkey_fingerprint fail", __func__);
   
         printf("%s:\n", identity_file);          printf("%s:\n", identity_file);
         printf("        Type: %s %s certificate\n", sshkey_ssh_name(key),          printf("        Type: %s %s certificate\n", sshkey_ssh_name(key),
Line 2199 
Line 2207 
 {  {
         char dotsshdir[PATH_MAX], comment[1024], *passphrase1, *passphrase2;          char dotsshdir[PATH_MAX], comment[1024], *passphrase1, *passphrase2;
         char *checkpoint = NULL;          char *checkpoint = NULL;
         char out_file[PATH_MAX], *rr_hostname = NULL, *ep;          char out_file[PATH_MAX], *rr_hostname = NULL, *ep, *fp, *ra;
         struct sshkey *private, *public;          struct sshkey *private, *public;
         struct passwd *pw;          struct passwd *pw;
         struct stat st;          struct stat st;
Line 2686 
Line 2694 
         fclose(f);          fclose(f);
   
         if (!quiet) {          if (!quiet) {
                 char *fp = sshkey_fingerprint(public, fingerprint_hash,                  fp = sshkey_fingerprint(public, fingerprint_hash,
                     SSH_FP_DEFAULT);                      SSH_FP_DEFAULT);
                 char *ra = sshkey_fingerprint(public, fingerprint_hash,                  ra = sshkey_fingerprint(public, fingerprint_hash,
                     SSH_FP_RANDOMART);                      SSH_FP_RANDOMART);
                   if (fp == NULL || ra == NULL)
                           fatal("sshkey_fingerprint failed");
                 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");

Legend:
Removed from v.1.257  
changed lines
  Added in v.1.260