mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Soften behaviour of the Compression=no/yes option
Currently Compression=no (the default) force-disables zlib algos, while Compression=yes force-enables it. This means that mismatching options between client and server lead to connection failure. This can easily happen if the server has default settings but the client specifies Compression=yes. OpenSSH treats the option as a "prefer compression" setting: Compression=no -> none,zlib@openssh.com,zlib (default) Compression=yes -> zlib@openssh.com,zlib,none This commit changes the libssh behaviour to the same as OpenSSH. Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
#endif /* HAVE_LIBCRYPTO */
|
||||
|
||||
#ifdef WITH_ZLIB
|
||||
#define ZLIB "none,zlib,zlib@openssh.com"
|
||||
#define ZLIB "none,zlib@openssh.com,zlib"
|
||||
#else
|
||||
#define ZLIB "none"
|
||||
#endif
|
||||
@@ -229,8 +229,8 @@ static const char *default_methods[] = {
|
||||
CHACHA20 AES,
|
||||
"hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512",
|
||||
"hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512",
|
||||
"none",
|
||||
"none",
|
||||
ZLIB,
|
||||
ZLIB,
|
||||
"",
|
||||
"",
|
||||
NULL
|
||||
|
||||
Reference in New Issue
Block a user