[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.279 and 1.280

version 1.279, 2015/11/16 22:53:07 version 1.280, 2015/11/18 08:37:28
Line 848 
Line 848 
   
         if (stat(identity_file, &st) < 0)          if (stat(identity_file, &st) < 0)
                 fatal("%s: %s", path, strerror(errno));                  fatal("%s: %s", path, strerror(errno));
         if ((r = sshkey_load_public(path, &public, &comment)) != 0)          if ((r = sshkey_load_public(path, &public, &comment)) != 0) {
                 fatal("Error loading public key \"%s\": %s", path, ssh_err(r));                  debug("load public \"%s\": %s", path, ssh_err(r));
                   if ((r = sshkey_load_private(path, NULL,
                       &public, &comment)) != 0) {
                           debug("load private \"%s\": %s", path, ssh_err(r));
                           fatal("%s is not a key file.", path);
                   }
           }
   
         fingerprint_one_key(public, comment);          fingerprint_one_key(public, comment);
         sshkey_free(public);          sshkey_free(public);
         free(comment);          free(comment);
Line 894 
Line 901 
                  * not reading from stdin (XXX support private keys on stdin).                   * not reading from stdin (XXX support private keys on stdin).
                  */                   */
                 if (lnum == 1 && strcmp(identity_file, "-") != 0 &&                  if (lnum == 1 && strcmp(identity_file, "-") != 0 &&
                     strstr(cp, "SSH PRIVATE KEY") != NULL) {                      strstr(cp, "PRIVATE KEY") != NULL) {
                         fclose(f);                          fclose(f);
                         fingerprint_private(path);                          fingerprint_private(path);
                         exit(0);                          exit(0);

Legend:
Removed from v.1.279  
changed lines
  Added in v.1.280