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

Diff for /src/usr.bin/ssh/kex.c between version 1.169 and 1.170

version 1.169, 2021/12/19 22:08:06 version 1.170, 2021/12/19 22:13:12
Line 421 
Line 421 
                 return SSH_ERR_ALLOC_FAIL;                  return SSH_ERR_ALLOC_FAIL;
         /* XXX filter algs list by allowed pubkey/hostbased types */          /* XXX filter algs list by allowed pubkey/hostbased types */
         if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||          if ((r = sshpkt_start(ssh, SSH2_MSG_EXT_INFO)) != 0 ||
             (r = sshpkt_put_u32(ssh, 1)) != 0 ||              (r = sshpkt_put_u32(ssh, 2)) != 0 ||
             (r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||              (r = sshpkt_put_cstring(ssh, "server-sig-algs")) != 0 ||
             (r = sshpkt_put_cstring(ssh, algs)) != 0 ||              (r = sshpkt_put_cstring(ssh, algs)) != 0 ||
               (r = sshpkt_put_cstring(ssh,
               "publickey-hostbound@openssh.com")) != 0 ||
               (r = sshpkt_put_cstring(ssh, "0")) != 0 ||
             (r = sshpkt_send(ssh)) != 0) {              (r = sshpkt_send(ssh)) != 0) {
                 error_fr(r, "compose");                  error_fr(r, "compose");
                 goto out;                  goto out;
Line 483 
Line 486 
                         debug_f("%s=<%s>", name, val);                          debug_f("%s=<%s>", name, val);
                         kex->server_sig_algs = val;                          kex->server_sig_algs = val;
                         val = NULL;                          val = NULL;
                   } else if (strcmp(name,
                       "publickey-hostbound@openssh.com") == 0) {
                           /* XXX refactor */
                           /* Ensure no \0 lurking in value */
                           if (memchr(val, '\0', vlen) != NULL) {
                                   error_f("nul byte in %s", name);
                                   return SSH_ERR_INVALID_FORMAT;
                           }
                           debug_f("%s=<%s>", name, val);
                           if (strcmp(val, "0") == 0)
                                   kex->flags |= KEX_HAS_PUBKEY_HOSTBOUND;
                           else {
                                   debug_f("unsupported version of %s extension",
                                       name);
                           }
                 } else                  } else
                         debug_f("%s (unrecognised)", name);                          debug_f("%s (unrecognised)", name);
                 free(name);                  free(name);

Legend:
Removed from v.1.169  
changed lines
  Added in v.1.170