From af99a4dc055c8c63d3d13f1e53aadabfa9b13a06 Mon Sep 17 00:00:00 2001 From: Nicolas Viennot Date: Sun, 4 Aug 2013 09:39:18 -0400 Subject: [PATCH] server kex: Fix server side compression typo The original code had a typo (COMP was CRYPT). This fixes the zlib compression method. Signed-off-by: Nicolas Viennot Reviewed-by: Andreas Schneider --- src/wrapper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wrapper.c b/src/wrapper.c index 0b26178a..485f1453 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -311,7 +311,7 @@ int crypt_set_algorithms_server(ssh_session session){ } /* compression */ - method = session->next_crypto->kex_methods[SSH_CRYPT_C_S]; + method = session->next_crypto->kex_methods[SSH_COMP_C_S]; if(strcmp(method,"zlib") == 0){ SSH_LOG(SSH_LOG_PACKET,"enabling C->S compression"); session->next_crypto->do_compress_in=1; @@ -320,7 +320,8 @@ int crypt_set_algorithms_server(ssh_session session){ ssh_set_error(session,SSH_FATAL,"zlib@openssh.com not supported"); return SSH_ERROR; } - method = session->next_crypto->kex_methods[SSH_CRYPT_S_C]; + + method = session->next_crypto->kex_methods[SSH_COMP_S_C]; if(strcmp(method,"zlib") == 0){ SSH_LOG(SSH_LOG_PACKET, "enabling S->C compression\n"); session->next_crypto->do_compress_out=1;