1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

Disabled preauth compression (zlib) by default

Removed it from the wanted methods list in the ssh_options_set function. Now users have to set the compression value to 'zlib' explicitly to enable it.
Updated unit tests to reflect removing zlib compression algo from the defaults compression algorithms.

Signed-off-by: Khalid Mamdouh <khalidmamdou7@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
khalid
2023-03-15 01:39:47 +02:00
committed by Jakub Jelen
parent 0c6995b149
commit cb19677d2e
3 changed files with 12 additions and 12 deletions

View File

@@ -940,9 +940,9 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
} else {
const char *tmp = v;
if (strcasecmp(value, "yes") == 0){
tmp = "zlib@openssh.com,zlib,none";
tmp = "zlib@openssh.com,none";
} else if (strcasecmp(value, "no") == 0){
tmp = "none,zlib@openssh.com,zlib";
tmp = "none,zlib@openssh.com";
}
rc = ssh_options_set_algo(session,
SSH_COMP_C_S,
@@ -960,9 +960,9 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
} else {
const char *tmp = v;
if (strcasecmp(value, "yes") == 0){
tmp = "zlib@openssh.com,zlib,none";
tmp = "zlib@openssh.com,none";
} else if (strcasecmp(value, "no") == 0){
tmp = "none,zlib@openssh.com,zlib";
tmp = "none,zlib@openssh.com";
}
rc = ssh_options_set_algo(session,