summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kex.c b/kex.c
index 49d701568..ce85f0439 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.c,v 1.155 2019/10/08 22:40:39 dtucker Exp $ */ 1/* $OpenBSD: kex.c,v 1.156 2020/01/23 10:24:29 dtucker 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 *
@@ -33,7 +33,9 @@
33#include <stdlib.h> 33#include <stdlib.h>
34#include <string.h> 34#include <string.h>
35#include <unistd.h> 35#include <unistd.h>
36#ifdef HAVE_POLL_H
36#include <poll.h> 37#include <poll.h>
38#endif
37 39
38#ifdef WITH_OPENSSL 40#ifdef WITH_OPENSSL
39#include <openssl/crypto.h> 41#include <openssl/crypto.h>
@@ -796,11 +798,14 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
796 798
797 if (name == NULL) 799 if (name == NULL)
798 return SSH_ERR_NO_COMPRESS_ALG_MATCH; 800 return SSH_ERR_NO_COMPRESS_ALG_MATCH;
801#ifdef WITH_ZLIB
799 if (strcmp(name, "zlib@openssh.com") == 0) { 802 if (strcmp(name, "zlib@openssh.com") == 0) {
800 comp->type = COMP_DELAYED; 803 comp->type = COMP_DELAYED;
801 } else if (strcmp(name, "zlib") == 0) { 804 } else if (strcmp(name, "zlib") == 0) {
802 comp->type = COMP_ZLIB; 805 comp->type = COMP_ZLIB;
803 } else if (strcmp(name, "none") == 0) { 806 } else
807#endif /* WITH_ZLIB */
808 if (strcmp(name, "none") == 0) {
804 comp->type = COMP_NONE; 809 comp->type = COMP_NONE;
805 } else { 810 } else {
806 error("%s: unsupported compression scheme %s", __func__, name); 811 error("%s: unsupported compression scheme %s", __func__, name);