diff options
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.132 2017/04/30 23:10:43 djm Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.133 2017/05/30 14:23:52 markus 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 | * |
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | /* prototype */ | 57 | /* prototype */ |
58 | static int kex_choose_conf(struct ssh *); | 58 | static int kex_choose_conf(struct ssh *); |
59 | static int kex_input_newkeys(int, u_int32_t, void *); | 59 | static int kex_input_newkeys(int, u_int32_t, struct ssh *); |
60 | 60 | ||
61 | static const char *proposal_names[PROPOSAL_MAX] = { | 61 | static const char *proposal_names[PROPOSAL_MAX] = { |
62 | "KEX algorithms", | 62 | "KEX algorithms", |
@@ -315,9 +315,8 @@ kex_prop_free(char **proposal) | |||
315 | 315 | ||
316 | /* ARGSUSED */ | 316 | /* ARGSUSED */ |
317 | static int | 317 | static int |
318 | kex_protocol_error(int type, u_int32_t seq, void *ctxt) | 318 | kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh) |
319 | { | 319 | { |
320 | struct ssh *ssh = active_state; /* XXX */ | ||
321 | int r; | 320 | int r; |
322 | 321 | ||
323 | error("kex protocol error: type %d seq %u", type, seq); | 322 | error("kex protocol error: type %d seq %u", type, seq); |
@@ -375,9 +374,8 @@ kex_send_newkeys(struct ssh *ssh) | |||
375 | } | 374 | } |
376 | 375 | ||
377 | int | 376 | int |
378 | kex_input_ext_info(int type, u_int32_t seq, void *ctxt) | 377 | kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh) |
379 | { | 378 | { |
380 | struct ssh *ssh = ctxt; | ||
381 | struct kex *kex = ssh->kex; | 379 | struct kex *kex = ssh->kex; |
382 | u_int32_t i, ninfo; | 380 | u_int32_t i, ninfo; |
383 | char *name, *val, *found; | 381 | char *name, *val, *found; |
@@ -414,9 +412,8 @@ kex_input_ext_info(int type, u_int32_t seq, void *ctxt) | |||
414 | } | 412 | } |
415 | 413 | ||
416 | static int | 414 | static int |
417 | kex_input_newkeys(int type, u_int32_t seq, void *ctxt) | 415 | kex_input_newkeys(int type, u_int32_t seq, struct ssh *ssh) |
418 | { | 416 | { |
419 | struct ssh *ssh = ctxt; | ||
420 | struct kex *kex = ssh->kex; | 417 | struct kex *kex = ssh->kex; |
421 | int r; | 418 | int r; |
422 | 419 | ||
@@ -467,9 +464,8 @@ kex_send_kexinit(struct ssh *ssh) | |||
467 | 464 | ||
468 | /* ARGSUSED */ | 465 | /* ARGSUSED */ |
469 | int | 466 | int |
470 | kex_input_kexinit(int type, u_int32_t seq, void *ctxt) | 467 | kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh) |
471 | { | 468 | { |
472 | struct ssh *ssh = ctxt; | ||
473 | struct kex *kex = ssh->kex; | 469 | struct kex *kex = ssh->kex; |
474 | const u_char *ptr; | 470 | const u_char *ptr; |
475 | u_int i; | 471 | u_int i; |