Subject: Re: compression

Re: compression

From: TJ Saunders <tj_at_castaglia.org>
Date: Fri, 27 Jul 2012 09:02:45 -0700 (PDT)

> Is compression supposed to work? It looks like when you set the
> LIBSSH2_FLAG_COMPRESS flag, it sets up the compression methods in kex
> and then tries to do compression during userauth. The server (OpenSSH is
> all I've got to test against) apparently expects userauth to be
> uncompressed. Here's a fix that works in my case--moving the comp method
> aside after kex then back again in _libssh2_channel_open. I'm not
> totally familiar with libssh2's guts, so there's probably a better way
> to do this (maybe using session->state instead?). Using
> _libssh2_channel_open like that seems a little sketchy to me.

OpenSSH supports multiple types of compression: "zlib" (which is in the
SSH RFCs) and "zlib_at_openssh.com", which is a non-standard (but commonly
adopted) OpenSSH extension.

libssh2 currently supports the "zlib" compression, which kicks in once the
KEXINIT has finished. OpenSSH's "zlib_at_openssh.com" compression doesn't
start until after successful user authentication.

The change you made removes libssh2's support for "zlib" compression
(which we would want to keep); it would be better, if possible, to add
support for the "zlib_at_openss.com" compression along side the existing
"zlib" compression support.

Cheers,
TJ
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Force is not a remedy.

           -John Bright

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-07-27