[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.345 and 1.346

version 1.345, 2021/01/27 09:26:54 version 1.346, 2021/01/27 10:05:28
Line 84 
Line 84 
  * SSH2 key exchange   * SSH2 key exchange
  */   */
   
 u_char *session_id2 = NULL;  
 u_int session_id2_len = 0;  
   
 static char *xxx_host;  static char *xxx_host;
 static struct sockaddr *xxx_hostaddr;  static struct sockaddr *xxx_hostaddr;
 static const struct ssh_conn_info *xxx_conn_info;  static const struct ssh_conn_info *xxx_conn_info;
Line 291 
Line 288 
         if ((r = kex_prop2buf(ssh->kex->my, myproposal)) != 0)          if ((r = kex_prop2buf(ssh->kex->my, myproposal)) != 0)
                 fatal_r(r, "kex_prop2buf");                  fatal_r(r, "kex_prop2buf");
   
         session_id2 = ssh->kex->session_id;  
         session_id2_len = ssh->kex->session_id_len;  
   
 #ifdef DEBUG_KEXDH  #ifdef DEBUG_KEXDH
         /* send 1st encrypted/maced/compressed message */          /* send 1st encrypted/maced/compressed message */
         if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 ||          if ((r = sshpkt_start(ssh, SSH2_MSG_IGNORE)) != 0 ||
Line 871 
Line 865 
                         if ((b = sshbuf_new()) == NULL)                          if ((b = sshbuf_new()) == NULL)
                                 fatal_f("sshbuf_new failed");                                  fatal_f("sshbuf_new failed");
                         ssh_gssapi_buildmic(b, authctxt->server_user,                          ssh_gssapi_buildmic(b, authctxt->server_user,
                             authctxt->service, "gssapi-with-mic");                              authctxt->service, "gssapi-with-mic",
                               ssh->kex->session_id);
   
                         if ((gssbuf.value = sshbuf_mutable_ptr(b)) == NULL)                          if ((gssbuf.value = sshbuf_mutable_ptr(b)) == NULL)
                                 fatal_f("sshbuf_mutable_ptr failed");                                  fatal_f("sshbuf_mutable_ptr failed");
Line 1402 
Line 1397 
                 if ((b = sshbuf_new()) == NULL)                  if ((b = sshbuf_new()) == NULL)
                         fatal_f("sshbuf_new failed");                          fatal_f("sshbuf_new failed");
                 if (ssh->compat & SSH_OLD_SESSIONID) {                  if (ssh->compat & SSH_OLD_SESSIONID) {
                         if ((r = sshbuf_put(b, session_id2,                          if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
                             session_id2_len)) != 0)                                  fatal_fr(r, "sshbuf_putb");
                                 fatal_fr(r, "sshbuf_put");  
                 } else {                  } else {
                         if ((r = sshbuf_put_string(b, session_id2,                          if ((r = sshbuf_put_stringb(b,
                             session_id2_len)) != 0)                              ssh->kex->session_id)) != 0)
                                 fatal_fr(r, "sshbuf_put_string");                                  fatal_fr(r, "sshbuf_put_stringb");
                 }                  }
                 skip = sshbuf_len(b);                  skip = sshbuf_len(b);
                 if ((r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||                  if ((r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||
Line 2165 
Line 2159 
                 error_fr(r, "sshkey_to_blob");                  error_fr(r, "sshkey_to_blob");
                 goto out;                  goto out;
         }          }
         if ((r = sshbuf_put_string(b, session_id2, session_id2_len)) != 0 ||          if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 ||
             (r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||              (r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 ||
             (r = sshbuf_put_cstring(b, authctxt->server_user)) != 0 ||              (r = sshbuf_put_cstring(b, authctxt->server_user)) != 0 ||
             (r = sshbuf_put_cstring(b, authctxt->service)) != 0 ||              (r = sshbuf_put_cstring(b, authctxt->service)) != 0 ||

Legend:
Removed from v.1.345  
changed lines
  Added in v.1.346