diff options
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index e40874627..f7e332d8e 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.10 2002/06/19 00:27:55 deraadt Exp $"); | 28 | RCSID("$OpenBSD: monitor_wrap.c,v 1.11 2002/06/19 18:01:00 markus Exp $"); |
29 | 29 | ||
30 | #include <openssl/bn.h> | 30 | #include <openssl/bn.h> |
31 | #include <openssl/dh.h> | 31 | #include <openssl/dh.h> |
@@ -520,13 +520,21 @@ mm_send_keystate(struct monitor *pmonitor) | |||
520 | 520 | ||
521 | if (!compat20) { | 521 | if (!compat20) { |
522 | u_char iv[24]; | 522 | u_char iv[24]; |
523 | int ivlen; | 523 | u_char *key; |
524 | u_int ivlen, keylen; | ||
524 | 525 | ||
525 | buffer_put_int(&m, packet_get_protocol_flags()); | 526 | buffer_put_int(&m, packet_get_protocol_flags()); |
526 | 527 | ||
527 | buffer_put_int(&m, packet_get_ssh1_cipher()); | 528 | buffer_put_int(&m, packet_get_ssh1_cipher()); |
528 | 529 | ||
529 | debug3("%s: Sending ssh1 IV", __func__); | 530 | debug3("%s: Sending ssh1 KEY+IV", __func__); |
531 | keylen = packet_get_encryption_key(NULL); | ||
532 | key = xmalloc(keylen+1); /* add 1 if keylen == 0 */ | ||
533 | keylen = packet_get_encryption_key(key); | ||
534 | buffer_put_string(&m, key, keylen); | ||
535 | memset(key, 0, keylen); | ||
536 | xfree(key); | ||
537 | |||
530 | ivlen = packet_get_keyiv_len(MODE_OUT); | 538 | ivlen = packet_get_keyiv_len(MODE_OUT); |
531 | packet_get_keyiv(MODE_OUT, iv, ivlen); | 539 | packet_get_keyiv(MODE_OUT, iv, ivlen); |
532 | buffer_put_string(&m, iv, ivlen); | 540 | buffer_put_string(&m, iv, ivlen); |