You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
825 B

  1. Backport of
  2. https://anongit.mindrot.org/openssh.git/patch/?id=28652bca29046f62c7045e933e6b931de1d16737
  3. --- openssh-7.3p1/kex.c
  4. +++ openssh-7.3p1/kex.c
  5. @@ -419,6 +419,8 @@
  6. ssh_dispatch_set(ssh, SSH2_MSG_NEWKEYS, &kex_protocol_error);
  7. if ((r = sshpkt_get_end(ssh)) != 0)
  8. return r;
  9. + if ((r = ssh_set_newkeys(ssh, MODE_IN)) != 0)
  10. + return r;
  11. kex->done = 1;
  12. sshbuf_reset(kex->peer);
  13. /* sshbuf_reset(kex->my); */
  14. --- openssh-7.3p1/packet.c
  15. +++ openssh-7.3p1/packet.c
  16. @@ -1919,9 +1919,7 @@
  17. return r;
  18. return SSH_ERR_PROTOCOL_ERROR;
  19. }
  20. - if (*typep == SSH2_MSG_NEWKEYS)
  21. - r = ssh_set_newkeys(ssh, MODE_IN);
  22. - else if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
  23. + if (*typep == SSH2_MSG_USERAUTH_SUCCESS && !state->server_side)
  24. r = ssh_packet_enable_delayed_compress(ssh);
  25. else
  26. r = 0;