summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect2.c12
-rw-r--r--sshd.c7
2 files changed, 8 insertions, 11 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index c0814e5bc..3d3c7bf42 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.244 2016/05/23 23:30:50 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.245 2016/05/24 04:43:45 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -171,13 +171,9 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
171 compat_cipher_proposal(options.ciphers); 171 compat_cipher_proposal(options.ciphers);
172 myproposal[PROPOSAL_ENC_ALGS_STOC] = 172 myproposal[PROPOSAL_ENC_ALGS_STOC] =
173 compat_cipher_proposal(options.ciphers); 173 compat_cipher_proposal(options.ciphers);
174 if (options.compression) { 174 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
175 myproposal[PROPOSAL_COMP_ALGS_CTOS] = 175 myproposal[PROPOSAL_COMP_ALGS_STOC] = options.compression ?
176 myproposal[PROPOSAL_COMP_ALGS_STOC] = "zlib@openssh.com,zlib,none"; 176 "zlib@openssh.com,zlib,none" : "none,zlib@openssh.com,zlib";
177 } else {
178 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
179 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com,zlib";
180 }
181 myproposal[PROPOSAL_MAC_ALGS_CTOS] = 177 myproposal[PROPOSAL_MAC_ALGS_CTOS] =
182 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs; 178 myproposal[PROPOSAL_MAC_ALGS_STOC] = options.macs;
183 if (options.hostkeyalgorithms != NULL) { 179 if (options.hostkeyalgorithms != NULL) {
diff --git a/sshd.c b/sshd.c
index 0200691e8..799c7711f 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.469 2016/05/02 14:10:58 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.470 2016/05/24 04:43:45 dtucker 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
@@ -2617,10 +2617,11 @@ do_ssh2_kex(void)
2617 2617
2618 if (options.compression == COMP_NONE) { 2618 if (options.compression == COMP_NONE) {
2619 myproposal[PROPOSAL_COMP_ALGS_CTOS] = 2619 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
2620 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none"; 2620 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none";
2621 } else if (options.compression == COMP_DELAYED) { 2621 } else if (options.compression == COMP_DELAYED) {
2622 myproposal[PROPOSAL_COMP_ALGS_CTOS] = 2622 myproposal[PROPOSAL_COMP_ALGS_CTOS] =
2623 myproposal[PROPOSAL_COMP_ALGS_STOC] = "none,zlib@openssh.com"; 2623 myproposal[PROPOSAL_COMP_ALGS_STOC] =
2624 "none,zlib@openssh.com";
2624 } 2625 }
2625 2626
2626 if (options.rekey_limit || options.rekey_interval) 2627 if (options.rekey_limit || options.rekey_interval)