diff options
-rw-r--r-- | kex.c | 4 | ||||
-rw-r--r-- | kex.h | 5 | ||||
-rw-r--r-- | packet.c | 7 |
3 files changed, 10 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.125 2016/09/28 20:32:42 djm Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.126 2016/09/28 21:44:52 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 | * |
@@ -684,6 +684,8 @@ choose_comp(struct sshcomp *comp, char *client, char *server) | |||
684 | return SSH_ERR_NO_COMPRESS_ALG_MATCH; | 684 | return SSH_ERR_NO_COMPRESS_ALG_MATCH; |
685 | if (strcmp(name, "zlib@openssh.com") == 0) { | 685 | if (strcmp(name, "zlib@openssh.com") == 0) { |
686 | comp->type = COMP_DELAYED; | 686 | comp->type = COMP_DELAYED; |
687 | } else if (strcmp(name, "zlib") == 0) { | ||
688 | comp->type = COMP_ZLIB; | ||
687 | } else if (strcmp(name, "none") == 0) { | 689 | } else if (strcmp(name, "none") == 0) { |
688 | comp->type = COMP_NONE; | 690 | comp->type = COMP_NONE; |
689 | } else { | 691 | } else { |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.h,v 1.80 2016/09/28 20:32:42 djm Exp $ */ | 1 | /* $OpenBSD: kex.h,v 1.81 2016/09/28 21:44:52 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
@@ -64,7 +64,8 @@ | |||
64 | #define KEX_CURVE25519_SHA256_OLD "curve25519-sha256@libssh.org" | 64 | #define KEX_CURVE25519_SHA256_OLD "curve25519-sha256@libssh.org" |
65 | 65 | ||
66 | #define COMP_NONE 0 | 66 | #define COMP_NONE 0 |
67 | #define COMP_DELAYED 1 | 67 | #define COMP_ZLIB 1 |
68 | #define COMP_DELAYED 2 | ||
68 | 69 | ||
69 | #define CURVE25519_SIZE 32 | 70 | #define CURVE25519_SIZE 32 |
70 | 71 | ||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.240 2016/09/28 20:32:42 djm Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.241 2016/09/28 21:44:52 djm 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 |
@@ -965,8 +965,9 @@ ssh_set_newkeys(struct ssh *ssh, int mode) | |||
965 | /* explicit_bzero(enc->iv, enc->block_size); | 965 | /* explicit_bzero(enc->iv, enc->block_size); |
966 | explicit_bzero(enc->key, enc->key_len); | 966 | explicit_bzero(enc->key, enc->key_len); |
967 | explicit_bzero(mac->key, mac->key_len); */ | 967 | explicit_bzero(mac->key, mac->key_len); */ |
968 | if (comp->type == COMP_DELAYED && state->after_authentication && | 968 | if ((comp->type == COMP_ZLIB || |
969 | comp->enabled == 0) { | 969 | (comp->type == COMP_DELAYED && |
970 | state->after_authentication)) && comp->enabled == 0) { | ||
970 | if ((r = ssh_packet_init_compression(ssh)) < 0) | 971 | if ((r = ssh_packet_init_compression(ssh)) < 0) |
971 | return r; | 972 | return r; |
972 | if (mode == MODE_OUT) { | 973 | if (mode == MODE_OUT) { |