Skip to content

Commit ca574db

Browse files
committed
I had failed to reinsert some code to handle oRekeyLimit that I had taken out
for testing purposes. This was causing the rekey regression test to fail.
1 parent 5a3b963 commit ca574db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packet.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,11 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
969969
* handle safely */
970970
*max_blocks = cipher_rekey_blocks(enc->cipher);
971971

972+
/* if we have a custom oRekeyLimit use that. */
973+
if (state->rekey_limit)
974+
*max_blocks = MINIMUM(*max_blocks,
975+
state->rekey_limit / enc->block_size);
976+
972977
/* these lines support the debug */
973978
strlcpy(blocks_s, "?", sizeof(blocks_s));
974979
strlcpy(bytes_s, "?", sizeof(bytes_s));

0 commit comments

Comments
 (0)