diff options
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/kex.c | 2 | ||||
-rw-r--r-- | libssh/wrapper.c | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libssh/kex.c b/libssh/kex.c index c2ca7f26..1e50eb1f 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 b91077ec..ae60b2e6 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; } |