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

Diff for /src/usr.bin/ssh/ssh-add.c between version 1.119 and 1.120

version 1.119, 2015/02/03 00:34:14 version 1.120, 2015/02/21 21:46:57
Line 120 
Line 120 
         free(comment);          free(comment);
         comment = NULL;          comment = NULL;
         xasprintf(&certpath, "%s-cert.pub", filename);          xasprintf(&certpath, "%s-cert.pub", filename);
         if ((r = sshkey_load_public(certpath, &cert, &comment)) == 0)          if ((r = sshkey_load_public(certpath, &cert, &comment)) != 0) {
                   if (r != SSH_ERR_SYSTEM_ERROR || errno != ENOENT)
                           error("Failed to load certificate \"%s\": %s",
                               certpath, ssh_err(r));
                 goto out;                  goto out;
           }
   
         if (!sshkey_equal_public(cert, public))          if (!sshkey_equal_public(cert, public))
                 fatal("Certificate %s does not match private key %s",                  fatal("Certificate %s does not match private key %s",
                     certpath, filename);                      certpath, filename);
   
         if (ssh_remove_identity(agent_fd, cert)) {          if ((r = ssh_remove_identity(agent_fd, cert)) == 0) {
                 fprintf(stderr, "Identity removed: %s (%s)\n", certpath,                  fprintf(stderr, "Identity removed: %s (%s)\n", certpath,
                     comment);                      comment);
                 ret = 0;                  ret = 0;
         } else          } else
                 fprintf(stderr, "Could not remove identity: %s\n", certpath);                  fprintf(stderr, "Could not remove identity \"%s\": %s\n",
                       certpath, ssh_err(r));
   
  out:   out:
         if (cert != NULL)          if (cert != NULL)

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120