diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.86 2010/09/22 05:01:29 djm Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.87 2012/08/17 01:22:56 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -242,8 +242,18 @@ kex_input_kexinit(int type, u_int32_t seq, void *ctxt) | |||
242 | packet_get_char(); | 242 | packet_get_char(); |
243 | for (i = 0; i < PROPOSAL_MAX; i++) | 243 | for (i = 0; i < PROPOSAL_MAX; i++) |
244 | xfree(packet_get_string(NULL)); | 244 | xfree(packet_get_string(NULL)); |
245 | (void) packet_get_char(); | 245 | /* |
246 | (void) packet_get_int(); | 246 | * XXX RFC4253 sec 7: "each side MAY guess" - currently no supported |
247 | * KEX method has the server move first, but a server might be using | ||
248 | * a custom method or one that we otherwise don't support. We should | ||
249 | * be prepared to remember first_kex_follows here so we can eat a | ||
250 | * packet later. | ||
251 | * XXX2 - RFC4253 is kind of ambiguous on what first_kex_follows means | ||
252 | * for cases where the server *doesn't* go first. I guess we should | ||
253 | * ignore it when it is set for these cases, which is what we do now. | ||
254 | */ | ||
255 | (void) packet_get_char(); /* first_kex_follows */ | ||
256 | (void) packet_get_int(); /* reserved */ | ||
247 | packet_check_eom(); | 257 | packet_check_eom(); |
248 | 258 | ||
249 | kex_kexinit_finish(kex); | 259 | kex_kexinit_finish(kex); |