version 1.299, 2021/01/27 10:05:28 |
version 1.300, 2021/04/03 06:18:40 |
|
|
ssh_packet_init_compression(struct ssh *ssh) |
ssh_packet_init_compression(struct ssh *ssh) |
{ |
{ |
if (!ssh->state->compression_buffer && |
if (!ssh->state->compression_buffer && |
((ssh->state->compression_buffer = sshbuf_new()) == NULL)) |
((ssh->state->compression_buffer = sshbuf_new()) == NULL)) |
return SSH_ERR_ALLOC_FAIL; |
return SSH_ERR_ALLOC_FAIL; |
return 0; |
return 0; |
} |
} |
|
|
} |
} |
if (state->newkeys[mode] != NULL) { |
if (state->newkeys[mode] != NULL) { |
debug_f("rekeying %s, input %llu bytes %llu blocks, " |
debug_f("rekeying %s, input %llu bytes %llu blocks, " |
"output %llu bytes %llu blocks", dir, |
"output %llu bytes %llu blocks", dir, |
(unsigned long long)state->p_read.bytes, |
(unsigned long long)state->p_read.bytes, |
(unsigned long long)state->p_read.blocks, |
(unsigned long long)state->p_read.blocks, |
(unsigned long long)state->p_send.bytes, |
(unsigned long long)state->p_send.bytes, |
(unsigned long long)state->p_send.blocks); |
(unsigned long long)state->p_send.blocks); |
kex_free_newkeys(state->newkeys[mode]); |
kex_free_newkeys(state->newkeys[mode]); |
state->newkeys[mode] = NULL; |
state->newkeys[mode] = NULL; |
} |
} |
|
|
explicit_bzero(mac->key, mac->key_len); */ |
explicit_bzero(mac->key, mac->key_len); */ |
if ((comp->type == COMP_ZLIB || |
if ((comp->type == COMP_ZLIB || |
(comp->type == COMP_DELAYED && |
(comp->type == COMP_DELAYED && |
state->after_authentication)) && comp->enabled == 0) { |
state->after_authentication)) && comp->enabled == 0) { |
if ((r = ssh_packet_init_compression(ssh)) < 0) |
if ((r = ssh_packet_init_compression(ssh)) < 0) |
return r; |
return r; |
if (mode == MODE_OUT) { |
if (mode == MODE_OUT) { |