summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kex.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2020-01-23 10:24:31 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2020-01-23 10:24:31 +0000
commit5c2f3155ce4f7609061759dd4894c6d716202256 (patch)
treef9a1f0c69b0786087e801ef6794c6f384fc3f128 /usr.bin/ssh/kex.c
parentf23ed0d7ffd13324e8d7c0a8ecd84b856fbeb8ab (diff)
Make zlib optional. This adds a "ZLIB" build time option that allows
building without zlib compression and associated options. With feedback from markus@, ok djm@
Diffstat (limited to 'usr.bin/ssh/kex.c')
-rw-r--r--usr.bin/ssh/kex.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index 148196aef6b..3f12dbce16f 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.155 2019/10/08 22:40:39 dtucker Exp $ */
+/* $OpenBSD: kex.c,v 1.156 2020/01/23 10:24:29 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -783,11 +783,14 @@ choose_comp(struct sshcomp *comp, char *client, char *server)
if (name == NULL)
return SSH_ERR_NO_COMPRESS_ALG_MATCH;
+#ifdef WITH_ZLIB
if (strcmp(name, "zlib@openssh.com") == 0) {
comp->type = COMP_DELAYED;
} else if (strcmp(name, "zlib") == 0) {
comp->type = COMP_ZLIB;
- } else if (strcmp(name, "none") == 0) {
+ } else
+#endif /* WITH_ZLIB */
+ if (strcmp(name, "none") == 0) {
comp->type = COMP_NONE;
} else {
error("%s: unsupported compression scheme %s", __func__, name);