[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] server kex: Fix server side compression typo
[Thread Prev] | [Thread Next]
- Subject: [PATCH 1/2] server kex: Fix server side compression typo
- From: Nicolas Viennot <nicolas@xxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 4 Aug 2013 09:39:18 -0400
- To: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Cc: libssh@xxxxxxxxxx
The original code had a typo (COMP was CRYPT). This fixes the zlib compression
method.
Signed-off-by: Nicolas Viennot <nicolas@xxxxxxxxxxx>
---
src/wrapper.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/wrapper.c b/src/wrapper.c
index 0b26178..485f145 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@xxxxxxxxxxx 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;
--
1.8.3.2
On Sun, Aug 4, 2013 at 5:17 AM, Andreas Schneider <asn@xxxxxxxxxxxxxx> wrote:
> On Monday 10 June 2013 06:02:55 Nicolas Viennot wrote:
>> The original code had a typo (COMP was CRYPT). This patch fixes this.
>> This patch also enables delayed compression, as it is properly supported by
>> the current code base.
>
> Nicolas,
>
> fixing the typo is probably correct but for the other part we think the patch
> is incomplete. So this should be split in two patches. Could you tell us how
> to reproduce it?
>
>
> Thanks,
>
>
> -- andreas
>
>> Signed-off-by: Nicolas Viennot <nicolas@xxxxxxxxxxx>
>> ---
>> src/wrapper.c | 13 +++++++------
>> 1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/wrapper.c b/src/wrapper.c
>> index b8a489d..c04322a 100644
>> --- a/src/wrapper.c
>> +++ b/src/wrapper.c
>> @@ -314,23 +314,24 @@ 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(session,SSH_LOG_PACKET,"enabling C->S compression");
>> session->next_crypto->do_compress_in=1;
>> }
>> if(strcmp(method,"zlib@xxxxxxxxxxx") == 0){
>> - ssh_set_error(session,SSH_FATAL,"zlib@xxxxxxxxxxx not supported");
>> - goto error;
>> + ssh_log(session,SSH_LOG_PACKET,"enabling C->S compression");
>> + session->next_crypto->delayed_compress_in=1;
>> }
>> - 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(session,SSH_LOG_PACKET,"enabling S->C compression\n");
>> session->next_crypto->do_compress_out=1;
>> }
>> if(strcmp(method,"zlib@xxxxxxxxxxx") == 0){
>> - ssh_set_error(session,SSH_FATAL,"zlib@xxxxxxxxxxx not supported");
>> - goto error;
>> + ssh_log(session,SSH_LOG_PACKET,"enabling S->C delayed
>> compression\n"); + session->next_crypto->delayed_compress_out=1;
>> }
>>
>> method = session->next_crypto->kex_methods[SSH_HOSTKEYS];
> --
> Andreas Schneider GPG-ID: F33E3FC6
> www.cryptomilk.org asn@xxxxxxxxxxxxxx
>
Archive administrator: postmaster@lists.cynapses.org