[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.360 and 1.361

version 1.360, 2022/08/19 06:07:47 version 1.361, 2022/09/17 10:33:18
Line 91 
Line 91 
 static int  static int
 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh)  verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh)
 {  {
           int r;
   
           if ((r = sshkey_check_rsa_length(hostkey,
               options.required_rsa_size)) != 0)
                   fatal_r(r, "Bad server host key");
         if (verify_host_key(xxx_host, xxx_hostaddr, hostkey,          if (verify_host_key(xxx_host, xxx_hostaddr, hostkey,
             xxx_conn_info) == -1)              xxx_conn_info) == -1)
                 fatal("Host key verification failed.");                  fatal("Host key verification failed.");
Line 1599 
Line 1604 
                         private = NULL;                          private = NULL;
                         quit = 1;                          quit = 1;
                 }                  }
                   if (!quit && (r = sshkey_check_rsa_length(private,
                       options.required_rsa_size)) != 0) {
                           debug_fr(r, "Skipping key %s", id->filename);
                           sshkey_free(private);
                           private = NULL;
                           quit = 1;
                   }
                 if (!quit && private != NULL && id->agent_fd == -1 &&                  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,
Line 1745 
Line 1757 
         /* list of keys supported by the agent */          /* list of keys supported by the agent */
         if ((r = get_agent_identities(ssh, &agent_fd, &idlist)) == 0) {          if ((r = get_agent_identities(ssh, &agent_fd, &idlist)) == 0) {
                 for (j = 0; j < idlist->nkeys; j++) {                  for (j = 0; j < idlist->nkeys; j++) {
                           if ((r = sshkey_check_rsa_length(idlist->keys[j],
                               options.required_rsa_size)) != 0) {
                                   debug_fr(r, "ignoring %s agent key",
                                       sshkey_ssh_name(idlist->keys[j]));
                                   continue;
                           }
                         found = 0;                          found = 0;
                         TAILQ_FOREACH(id, &files, next) {                          TAILQ_FOREACH(id, &files, next) {
                                 /*                                  /*

Legend:
Removed from v.1.360  
changed lines
  Added in v.1.361