diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2020-01-23 10:24:29 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-01-23 21:53:54 +1100 |
commit | 7f8e66fea8c4e2a910df9067cb7638999b7764d5 (patch) | |
tree | 88c1a4a73a03cfa993fee0c1f23b6327ef1351a1 /kex.c | |
parent | 69ac4e33023b379e9a8e9b4b6aeeffa6d1fcf6fa (diff) |
upstream: 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@
OpenBSD-Commit-ID: 44c6e1133a90fd15a3aa865bdedc53bab28b7910
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 | * |
@@ -798,11 +798,14 @@ choose_comp(struct sshcomp *comp, char *client, char *server) | |||
798 | 798 | ||
799 | if (name == NULL) | 799 | if (name == NULL) |
800 | return SSH_ERR_NO_COMPRESS_ALG_MATCH; | 800 | return SSH_ERR_NO_COMPRESS_ALG_MATCH; |
801 | #ifdef WITH_ZLIB | ||
801 | if (strcmp(name, "zlib@openssh.com") == 0) { | 802 | if (strcmp(name, "zlib@openssh.com") == 0) { |
802 | comp->type = COMP_DELAYED; | 803 | comp->type = COMP_DELAYED; |
803 | } else if (strcmp(name, "zlib") == 0) { | 804 | } else if (strcmp(name, "zlib") == 0) { |
804 | comp->type = COMP_ZLIB; | 805 | comp->type = COMP_ZLIB; |
805 | } else if (strcmp(name, "none") == 0) { | 806 | } else |
807 | #endif /* WITH_ZLIB */ | ||
808 | if (strcmp(name, "none") == 0) { | ||
806 | comp->type = COMP_NONE; | 809 | comp->type = COMP_NONE; |
807 | } else { | 810 | } else { |
808 | error("%s: unsupported compression scheme %s", __func__, name); | 811 | error("%s: unsupported compression scheme %s", __func__, name); |