diff options
author | sf@openbsd.org <sf@openbsd.org> | 2018-07-09 15:37:10 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-10 07:13:41 +0200 |
commit | 168b46f405d6736960ba7930389eecb9b6710b7e (patch) | |
tree | aab4c134cce64b06caefa41246805d69daab4fe8 /packet.c | |
parent | upstream: Rename COMP_DELAYED to COMP_ZLIB (diff) | |
download | openssh-168b46f405d6736960ba7930389eecb9b6710b7e.tar.xz openssh-168b46f405d6736960ba7930389eecb9b6710b7e.zip |
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 @@ -/* $OpenBSD: packet.c,v 1.274 2018/07/06 09:06:14 sf Exp $ */ +/* $OpenBSD: packet.c,v 1.275 2018/07/09 13:37:10 sf Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -879,8 +879,9 @@ ssh_set_newkeys(struct ssh *ssh, int mode) /* explicit_bzero(enc->iv, enc->block_size); explicit_bzero(enc->key, enc->key_len); explicit_bzero(mac->key, mac->key_len); */ - if (comp->type == COMP_ZLIB && state->after_authentication - && comp->enabled == 0) { + if ((comp->type == COMP_ZLIB || + (comp->type == COMP_DELAYED && + state->after_authentication)) && comp->enabled == 0) { if ((r = ssh_packet_init_compression(ssh)) < 0) return r; if (mode == MODE_OUT) { @@ -970,7 +971,7 @@ ssh_packet_enable_delayed_compress(struct ssh *ssh) /* * Remember that we are past the authentication step, so rekeying - * with COMP_ZLIB will turn on compression immediately. + * with COMP_DELAYED will turn on compression immediately. */ state->after_authentication = 1; for (mode = 0; mode < MODE_MAX; mode++) { @@ -978,7 +979,7 @@ ssh_packet_enable_delayed_compress(struct ssh *ssh) if (state->newkeys[mode] == NULL) continue; comp = &state->newkeys[mode]->comp; - if (comp && !comp->enabled && comp->type == COMP_ZLIB) { + if (comp && !comp->enabled && comp->type == COMP_DELAYED) { if ((r = ssh_packet_init_compression(ssh)) != 0) return r; if (mode == MODE_OUT) { |