1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-13 09:07:33 -05:00

Add 'next_message' methods to cipher and MAC vtables.

This provides a convenient hook to be called between SSH messages, for
the crypto components to do any per-message processing like
incrementing a sequence number.
This commit is contained in:
Simon Tatham
2022-08-16 18:27:06 +01:00
parent 9160c41e7b
commit 840043f06e
12 changed files with 66 additions and 0 deletions

View File

@ -964,6 +964,7 @@ const ssh2_macalg ssh2_poly1305 = {
.setkey = poly_setkey,
.start = poly_start,
.genresult = poly_genresult,
.next_message = nullmac_next_message,
.text_name = poly_text_name,
.name = "",
.etm_name = "", /* Not selectable individually, just part of
@ -1061,6 +1062,7 @@ const ssh_cipheralg ssh2_chacha20_poly1305 = {
.decrypt = ccp_decrypt,
.encrypt_length = ccp_encrypt_length,
.decrypt_length = ccp_decrypt_length,
.next_message = nullcipher_next_message, // FIXME: can we use this?
.ssh2_id = "chacha20-poly1305@openssh.com",
.blksize = 1,
.real_keybits = 512,