mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 10:57:01 +00:00
Make sure kexfirstinitialise is called early enough
This commit is contained in:
parent
cbdc1f0753
commit
0e1dee828a
@ -124,6 +124,8 @@ void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection
|
|||||||
/* Exchange identification */
|
/* Exchange identification */
|
||||||
send_session_identification();
|
send_session_identification();
|
||||||
|
|
||||||
|
kexfirstinitialise(); /* initialise the kex state */
|
||||||
|
|
||||||
send_msg_kexinit();
|
send_msg_kexinit();
|
||||||
|
|
||||||
session_loop(cli_sessionloop);
|
session_loop(cli_sessionloop);
|
||||||
|
@ -90,8 +90,6 @@ void common_session_init(int sock_in, int sock_out) {
|
|||||||
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[0]);
|
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[0]);
|
||||||
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[1]);
|
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[1]);
|
||||||
|
|
||||||
kexfirstinitialise(); /* initialise the kex state */
|
|
||||||
|
|
||||||
ses.writepayload = buf_new(TRANS_MAX_PAYLOAD_LEN);
|
ses.writepayload = buf_new(TRANS_MAX_PAYLOAD_LEN);
|
||||||
ses.transseq = 0;
|
ses.transseq = 0;
|
||||||
|
|
||||||
|
@ -138,6 +138,8 @@ void svr_session(int sock, int childpipe) {
|
|||||||
|
|
||||||
/* exchange identification, version etc */
|
/* exchange identification, version etc */
|
||||||
send_session_identification();
|
send_session_identification();
|
||||||
|
|
||||||
|
kexfirstinitialise(); /* initialise the kex state */
|
||||||
|
|
||||||
/* start off with key exchange */
|
/* start off with key exchange */
|
||||||
send_msg_kexinit();
|
send_msg_kexinit();
|
||||||
|
Loading…
Reference in New Issue
Block a user