1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-31 23:30:25 +03:00

compression: add support for zlib@openssh.com

Add a "use_in_auth" flag to the LIBSSH2_COMP_METHOD struct and a
separate "zlib@openssh.com" method, along with checking session->state
for LIBSSH2_STATE_AUTHENTICATED. Appears to work on the OpenSSH servers
I've tried against, and it should work as before with normal zlib
compression.
This commit is contained in:
Dave Hayden
2012-08-19 13:47:50 +02:00
committed by Daniel Stenberg
parent e470738a0c
commit 42fec44c8a
3 changed files with 30 additions and 4 deletions

View File

@@ -892,6 +892,7 @@ struct _LIBSSH2_COMP_METHOD
{
const char *name;
int compress; /* 1 if it does compress, 0 if it doesn't */
int use_in_auth; /* 1 if compression should be used in userauth */
int (*init) (LIBSSH2_SESSION *session, int compress, void **abstract);
int (*comp) (LIBSSH2_SESSION *session,
unsigned char *dest,