diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.433 2015/01/17 18:53:34 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.434 2015/01/19 19:52:16 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -188,9 +188,6 @@ int num_listen_socks = 0; | |||
188 | char *client_version_string = NULL; | 188 | char *client_version_string = NULL; |
189 | char *server_version_string = NULL; | 189 | char *server_version_string = NULL; |
190 | 190 | ||
191 | /* for rekeying XXX fixme */ | ||
192 | Kex *xxx_kex; | ||
193 | |||
194 | /* Daemon's agent connection */ | 191 | /* Daemon's agent connection */ |
195 | int auth_sock = -1; | 192 | int auth_sock = -1; |
196 | int have_agent = 0; | 193 | int have_agent = 0; |
@@ -663,7 +660,7 @@ privsep_preauth(Authctxt *authctxt) | |||
663 | /* Set up unprivileged child process to deal with network data */ | 660 | /* Set up unprivileged child process to deal with network data */ |
664 | pmonitor = monitor_init(); | 661 | pmonitor = monitor_init(); |
665 | /* Store a pointer to the kex for later rekeying */ | 662 | /* Store a pointer to the kex for later rekeying */ |
666 | pmonitor->m_pkex = &xxx_kex; | 663 | pmonitor->m_pkex = &active_state->kex; |
667 | 664 | ||
668 | if (use_privsep == PRIVSEP_ON) | 665 | if (use_privsep == PRIVSEP_ON) |
669 | box = ssh_sandbox_init(pmonitor); | 666 | box = ssh_sandbox_init(pmonitor); |
@@ -2192,8 +2189,7 @@ main(int ac, char **av) | |||
2192 | do_authenticated(authctxt); | 2189 | do_authenticated(authctxt); |
2193 | 2190 | ||
2194 | /* The connection has been terminated. */ | 2191 | /* The connection has been terminated. */ |
2195 | packet_get_state(MODE_IN, NULL, NULL, NULL, &ibytes); | 2192 | packet_get_bytes(&ibytes, &obytes); |
2196 | packet_get_state(MODE_OUT, NULL, NULL, NULL, &obytes); | ||
2197 | verbose("Transferred: sent %llu, received %llu bytes", | 2193 | verbose("Transferred: sent %llu, received %llu bytes", |
2198 | (unsigned long long)obytes, (unsigned long long)ibytes); | 2194 | (unsigned long long)obytes, (unsigned long long)ibytes); |
2199 | 2195 | ||
@@ -2505,6 +2501,7 @@ do_ssh2_kex(void) | |||
2505 | 2501 | ||
2506 | /* start key exchange */ | 2502 | /* start key exchange */ |
2507 | kex = kex_setup(myproposal); | 2503 | kex = kex_setup(myproposal); |
2504 | active_state->kex = kex; | ||
2508 | #ifdef WITH_OPENSSL | 2505 | #ifdef WITH_OPENSSL |
2509 | kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; | 2506 | kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; |
2510 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; | 2507 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; |
@@ -2521,8 +2518,6 @@ do_ssh2_kex(void) | |||
2521 | kex->host_key_index=&get_hostkey_index; | 2518 | kex->host_key_index=&get_hostkey_index; |
2522 | kex->sign = sshd_hostkey_sign; | 2519 | kex->sign = sshd_hostkey_sign; |
2523 | 2520 | ||
2524 | xxx_kex = kex; | ||
2525 | |||
2526 | dispatch_run(DISPATCH_BLOCK, &kex->done, kex); | 2521 | dispatch_run(DISPATCH_BLOCK, &kex->done, kex); |
2527 | 2522 | ||
2528 | session_id2 = kex->session_id; | 2523 | session_id2 = kex->session_id; |