aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-07-23 16:49:28 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-07-23 16:49:28 +0200
commitd688ed2553cd756d9e0bdacd62145d1e9e1f1367 (patch)
tree2e351a55828a22b46608a89388b45c237b86454b /libssh
parentb4c0b0369472a56f613f04f2bcc4f34c471cd4f1 (diff)
downloadlibssh-d688ed2553cd756d9e0bdacd62145d1e9e1f1367.tar.gz
libssh-d688ed2553cd756d9e0bdacd62145d1e9e1f1367.tar.xz
libssh-d688ed2553cd756d9e0bdacd62145d1e9e1f1367.zip
Begining of zlib@openssh.org implementation
Diffstat (limited to 'libssh')
-rw-r--r--libssh/kex.c2
-rw-r--r--libssh/wrapper.c11
2 files changed, 9 insertions, 4 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index c2ca7f2..1e50eb1 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -67,7 +67,7 @@
#endif
#if defined(HAVE_LIBZ) && defined(WITH_LIBZ)
-#define ZLIB "none,zlib"
+#define ZLIB "none,zlib,zlib@openssh.org"
#else
#define ZLIB "none"
#endif
diff --git a/libssh/wrapper.c b/libssh/wrapper.c
index b91077e..ae60b2e 100644
--- a/libssh/wrapper.c
+++ b/libssh/wrapper.c
@@ -161,13 +161,18 @@ static int crypt_set_algorithms2(ssh_session session){
}
/* compression */
- if (strstr(session->client_kex.methods[SSH_COMP_C_S], "zlib")) {
+ if (strcmp(session->client_kex.methods[SSH_COMP_C_S], "zlib") == 0) {
session->next_crypto->do_compress_out = 1;
}
- if (strstr(session->client_kex.methods[SSH_COMP_S_C], "zlib")) {
+ if (strcmp(session->client_kex.methods[SSH_COMP_S_C], "zlib") == 0) {
session->next_crypto->do_compress_in = 1;
}
-
+ if (strcmp(session->client_kex.methods[SSH_COMP_C_S], "zlib@openssh.org") == 0) {
+ session->next_crypto->delayed_compress_out = 1;
+ }
+ if (strcmp(session->client_kex.methods[SSH_COMP_S_C], "zlib@openssh.org") == 0) {
+ session->next_crypto->delayed_compress_in = 1;
+ }
return SSH_OK;
}