diff options
author | sf@openbsd.org <sf@openbsd.org> | 2018-07-09 13:37:10 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-10 15:13:41 +1000 |
commit | 168b46f405d6736960ba7930389eecb9b6710b7e (patch) | |
tree | aab4c134cce64b06caefa41246805d69daab4fe8 /packet.c | |
parent | ab39267fa1243d02b6c330615539fc4b21e17dc4 (diff) |
upstream: Revert previous two commits
It turns out we still support pre-auth compression on the client.
Therefore revert the previous two commits:
date: 2018/07/06 09:06:14; author: sf; commitid: yZVYKIRtUZWD9CmE;
Rename COMP_DELAYED to COMP_ZLIB
Only delayed compression is supported nowadays.
ok markus@
date: 2018/07/06 09:05:01; author: sf; commitid: rEGuT5UgI9f6kddP;
Remove leftovers from pre-authentication compression
Support for this has been removed in 2016.
COMP_DELAYED will be renamed in a later commit.
ok markus@
OpenBSD-Commit-ID: cdfef526357e4e1483c86cf599491b2dafb77772
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.274 2018/07/06 09:06:14 sf Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.275 2018/07/09 13:37:10 sf 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 |
@@ -879,8 +879,9 @@ ssh_set_newkeys(struct ssh *ssh, int mode) | |||
879 | /* explicit_bzero(enc->iv, enc->block_size); | 879 | /* explicit_bzero(enc->iv, enc->block_size); |
880 | explicit_bzero(enc->key, enc->key_len); | 880 | explicit_bzero(enc->key, enc->key_len); |
881 | explicit_bzero(mac->key, mac->key_len); */ | 881 | explicit_bzero(mac->key, mac->key_len); */ |
882 | if (comp->type == COMP_ZLIB && state->after_authentication | 882 | if ((comp->type == COMP_ZLIB || |
883 | && comp->enabled == 0) { | 883 | (comp->type == COMP_DELAYED && |
884 | state->after_authentication)) && comp->enabled == 0) { | ||
884 | if ((r = ssh_packet_init_compression(ssh)) < 0) | 885 | if ((r = ssh_packet_init_compression(ssh)) < 0) |
885 | return r; | 886 | return r; |
886 | if (mode == MODE_OUT) { | 887 | if (mode == MODE_OUT) { |
@@ -970,7 +971,7 @@ ssh_packet_enable_delayed_compress(struct ssh *ssh) | |||
970 | 971 | ||
971 | /* | 972 | /* |
972 | * Remember that we are past the authentication step, so rekeying | 973 | * Remember that we are past the authentication step, so rekeying |
973 | * with COMP_ZLIB will turn on compression immediately. | 974 | * with COMP_DELAYED will turn on compression immediately. |
974 | */ | 975 | */ |
975 | state->after_authentication = 1; | 976 | state->after_authentication = 1; |
976 | for (mode = 0; mode < MODE_MAX; mode++) { | 977 | for (mode = 0; mode < MODE_MAX; mode++) { |
@@ -978,7 +979,7 @@ ssh_packet_enable_delayed_compress(struct ssh *ssh) | |||
978 | if (state->newkeys[mode] == NULL) | 979 | if (state->newkeys[mode] == NULL) |
979 | continue; | 980 | continue; |
980 | comp = &state->newkeys[mode]->comp; | 981 | comp = &state->newkeys[mode]->comp; |
981 | if (comp && !comp->enabled && comp->type == COMP_ZLIB) { | 982 | if (comp && !comp->enabled && comp->type == COMP_DELAYED) { |
982 | if ((r = ssh_packet_init_compression(ssh)) != 0) | 983 | if ((r = ssh_packet_init_compression(ssh)) != 0) |
983 | return r; | 984 | return r; |
984 | if (mode == MODE_OUT) { | 985 | if (mode == MODE_OUT) { |