[openssh-commits] [openssh] 02/19: upstream: Remove leftovers from pre-authentication compression

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jul 10 19:46:42 AEST 2018


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 95db395d2e56a6f868193aead6cadb2493f036c6
Author: sf at openbsd.org <sf at openbsd.org>
Date:   Fri Jul 6 09:05:01 2018 +0000

    upstream: 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: 6a99616c832627157113fcb0cf5a752daf2e6b58
---
 kex.c          | 4 +---
 kex.h          | 5 ++---
 monitor_wrap.c | 4 +---
 packet.c       | 7 +++----
 sshconnect2.c  | 4 ++--
 5 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/kex.c b/kex.c
index 2fd052e9..0c444e18 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.138 2018/07/04 13:49:31 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.139 2018/07/06 09:05:01 sf Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *
@@ -742,8 +742,6 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
 		return SSH_ERR_NO_COMPRESS_ALG_MATCH;
 	if (strcmp(name, "zlib at openssh.com") == 0) {
 		comp->type = COMP_DELAYED;
-	} else if (strcmp(name, "zlib") == 0) {
-		comp->type = COMP_ZLIB;
 	} else if (strcmp(name, "none") == 0) {
 		comp->type = COMP_NONE;
 	} else {
diff --git a/kex.h b/kex.h
index 3ffae2df..676c32ab 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.h,v 1.85 2018/07/04 13:49:31 djm Exp $ */
+/* $OpenBSD: kex.h,v 1.86 2018/07/06 09:05:01 sf Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -64,8 +64,7 @@
 #define	KEX_CURVE25519_SHA256_OLD	"curve25519-sha256 at libssh.org"
 
 #define COMP_NONE	0
-#define COMP_ZLIB	1
-#define COMP_DELAYED	2
+#define COMP_DELAYED	1
 
 #define CURVE25519_SIZE 32
 
diff --git a/monitor_wrap.c b/monitor_wrap.c
index b1f489f7..e280fd2a 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.99 2018/03/03 03:15:51 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.100 2018/07/06 09:05:01 sf Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos at citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus at openbsd.org>
@@ -84,8 +84,6 @@
 #include "ssherr.h"
 
 /* Imports */
-extern z_stream incoming_stream;
-extern z_stream outgoing_stream;
 extern struct monitor *pmonitor;
 extern Buffer loginmsg;
 extern ServerOptions options;
diff --git a/packet.c b/packet.c
index 4da9f52b..a39a340f 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.272 2018/07/06 09:03:02 sf Exp $ */
+/* $OpenBSD: packet.c,v 1.273 2018/07/06 09:05:01 sf Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -879,9 +879,8 @@ 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 ||
-	    (comp->type == COMP_DELAYED &&
-	     state->after_authentication)) && comp->enabled == 0) {
+	if (comp->type == COMP_DELAYED && state->after_authentication
+	    && comp->enabled == 0) {
 		if ((r = ssh_packet_init_compression(ssh)) < 0)
 			return r;
 		if (mode == MODE_OUT) {
diff --git a/sshconnect2.c b/sshconnect2.c
index f3ccd53a..183484e0 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.275 2018/07/04 13:49:31 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.276 2018/07/06 09:05:01 sf Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Damien Miller.  All rights reserved.
@@ -174,7 +174,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
 	    compat_cipher_proposal(options.ciphers);
 	myproposal[PROPOSAL_COMP_ALGS_CTOS] =
 	    myproposal[PROPOSAL_COMP_ALGS_STOC] = options.compression ?
-	    "zlib at openssh.com,zlib,none" : "none,zlib at openssh.com,zlib";
+	    "zlib at openssh.com,none" : "none,zlib at openssh.com";
 	myproposal[PROPOSAL_MAC_ALGS_CTOS] =
 	    myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
 	if (options.hostkeyalgorithms != NULL) {

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list