mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
server kex: enable delayed compression
The code is careful to reenable compression when rekeying. Signed-off-by: Nicolas Viennot <nicolas@viennot.biz> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
a466a624e2
commit
1ef00045dd
@@ -317,8 +317,13 @@ int crypt_set_algorithms_server(ssh_session session){
|
||||
session->next_crypto->do_compress_in=1;
|
||||
}
|
||||
if(strcmp(method,"zlib@openssh.com") == 0){
|
||||
ssh_set_error(session,SSH_FATAL,"zlib@openssh.com not supported");
|
||||
return SSH_ERROR;
|
||||
SSH_LOG(SSH_LOG_PACKET,"enabling C->S delayed compression");
|
||||
|
||||
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
|
||||
session->next_crypto->do_compress_in = 1;
|
||||
} else {
|
||||
session->next_crypto->delayed_compress_in = 1;
|
||||
}
|
||||
}
|
||||
|
||||
method = session->next_crypto->kex_methods[SSH_COMP_S_C];
|
||||
@@ -327,8 +332,13 @@ int crypt_set_algorithms_server(ssh_session session){
|
||||
session->next_crypto->do_compress_out=1;
|
||||
}
|
||||
if(strcmp(method,"zlib@openssh.com") == 0){
|
||||
ssh_set_error(session,SSH_FATAL,"zlib@openssh.com not supported");
|
||||
return SSH_ERROR;
|
||||
SSH_LOG(SSH_LOG_PACKET,"enabling S->C delayed compression\n");
|
||||
|
||||
if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) {
|
||||
session->next_crypto->do_compress_out = 1;
|
||||
} else {
|
||||
session->next_crypto->delayed_compress_out = 1;
|
||||
}
|
||||
}
|
||||
|
||||
method = session->next_crypto->kex_methods[SSH_HOSTKEYS];
|
||||
|
||||
Reference in New Issue
Block a user