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

Diff for /src/usr.bin/ssh/sshconnect2.c between version 1.229 and 1.230

version 1.229, 2015/11/15 22:26:49 version 1.230, 2015/12/04 00:24:55
Line 970 
Line 970 
         int ret;          int ret;
   
         /* the agent supports this key */          /* the agent supports this key */
         if (id->agent_fd)          if (id->agent_fd != -1)
                 return ssh_agent_sign(id->agent_fd, id->key, sigp, lenp,                  return ssh_agent_sign(id->agent_fd, id->key, sigp, lenp,
                     data, datalen, compat);                      data, datalen, compat);
   
Line 1189 
Line 1189 
                         quit = 1;                          quit = 1;
                         break;                          break;
                 }                  }
                 if (!quit && private != NULL && !id->agent_fd &&                  if (!quit && private != NULL && id->agent_fd == -1 &&
                     !(id->key && id->isprivate))                      !(id->key && id->isprivate))
                         maybe_add_key_to_agent(id->filename, private, comment,                          maybe_add_key_to_agent(id->filename, private, comment,
                             passphrase);                              passphrase);
Line 1219 
Line 1219 
         struct identity *id, *id2, *tmp;          struct identity *id, *id2, *tmp;
         struct idlist agent, files, *preferred;          struct idlist agent, files, *preferred;
         struct sshkey *key;          struct sshkey *key;
         int agent_fd, i, r, found;          int agent_fd = -1, i, r, found;
         size_t j;          size_t j;
         struct ssh_identitylist *idlist;          struct ssh_identitylist *idlist;
   
Line 1237 
Line 1237 
                         continue;                          continue;
                 options.identity_keys[i] = NULL;                  options.identity_keys[i] = NULL;
                 id = xcalloc(1, sizeof(*id));                  id = xcalloc(1, sizeof(*id));
                   id->agent_fd = -1;
                 id->key = key;                  id->key = key;
                 id->filename = xstrdup(options.identity_files[i]);                  id->filename = xstrdup(options.identity_files[i]);
                 id->userprovided = options.identity_file_userprovided[i];                  id->userprovided = options.identity_file_userprovided[i];
Line 1272 
Line 1273 
                     key->cert->type != SSH2_CERT_TYPE_USER)                      key->cert->type != SSH2_CERT_TYPE_USER)
                         continue;                          continue;
                 id = xcalloc(1, sizeof(*id));                  id = xcalloc(1, sizeof(*id));
                   id->agent_fd = -1;
                 id->key = key;                  id->key = key;
                 id->filename = xstrdup(options.certificate_files[i]);                  id->filename = xstrdup(options.certificate_files[i]);
                 id->userprovided = options.certificate_file_userprovided[i];                  id->userprovided = options.certificate_file_userprovided[i];
Line 1340 
Line 1342 
                         memset(id, 0, sizeof(*id));                          memset(id, 0, sizeof(*id));
                         continue;                          continue;
                 }                  }
                 debug2("key: %s (%p),%s", id->filename, id->key,                  debug2("key: %s (%p)%s%s", id->filename, id->key,
                     id->userprovided ? " explicit" : "");                      id->userprovided ? ", explicit" : "",
                       id->agent_fd != -1 ? ", agent" : "");
         }          }
 }  }
   

Legend:
Removed from v.1.229  
changed lines
  Added in v.1.230