[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.165 and 1.166

version 1.165, 2021/01/27 10:05:28 version 1.166, 2021/01/27 23:49:46
Line 1051 
Line 1051 
   
         /* save initial hash as session id */          /* save initial hash as session id */
         if ((kex->flags & KEX_INITIAL) != 0) {          if ((kex->flags & KEX_INITIAL) != 0) {
                 if ((kex->session_id = sshbuf_new()) == NULL)                  if (sshbuf_len(kex->session_id) != 0) {
                         return SSH_ERR_ALLOC_FAIL;                          error_f("already have session ID at kex");
                           return SSH_ERR_INTERNAL_ERROR;
                   }
                 if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0)                  if ((r = sshbuf_put(kex->session_id, hash, hashlen)) != 0)
                         return r;                          return r;
         } else if (sshbuf_len(kex->session_id) == 0) {          } else if (sshbuf_len(kex->session_id) == 0) {
                 error_f("no session ID in rekex");                  error_f("no session ID in rekex");
                         return SSH_ERR_INTERNAL_ERROR;                  return SSH_ERR_INTERNAL_ERROR;
         }          }
         for (i = 0; i < NKEYS; i++) {          for (i = 0; i < NKEYS; i++) {
                 if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen,                  if ((r = derive_key(ssh, 'A'+i, kex->we_need, hash, hashlen,

Legend:
Removed from v.1.165  
changed lines
  Added in v.1.166