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

Diff for /src/usr.bin/ssh/kexgexc.c between version 1.37 and 1.38

version 1.37, 2021/01/31 22:55:29 version 1.38, 2021/12/19 22:08:06
Line 199 
Line 199 
             hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0)              hashlen, kex->hostkey_alg, ssh->compat, NULL)) != 0)
                 goto out;                  goto out;
   
         if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0)          if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) != 0 ||
                 r = kex_send_newkeys(ssh);              (r = kex_send_newkeys(ssh)) != 0)
                   goto out;
   
           /* save initial signature and hostkey */
           if ((kex->flags & KEX_INITIAL) != 0) {
                   if (kex->initial_hostkey != NULL || kex->initial_sig != NULL) {
                           r = SSH_ERR_INTERNAL_ERROR;
                           goto out;
                   }
                   if ((kex->initial_sig = sshbuf_new()) == NULL) {
                           r = SSH_ERR_ALLOC_FAIL;
                           goto out;
                   }
                   if ((r = sshbuf_put(kex->initial_sig, signature, slen)) != 0)
                           goto out;
                   kex->initial_hostkey = server_host_key;
                   server_host_key = NULL;
           }
           /* success */
  out:   out:
         explicit_bzero(hash, sizeof(hash));          explicit_bzero(hash, sizeof(hash));
         DH_free(kex->dh);          DH_free(kex->dh);

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38