1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -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

@ -42,7 +42,9 @@ add_sources_from_current_dir(utils
memory.c
memxor.c
null_lp.c
nullcipher.c
nullkey.c
nullmac.c
nullseat.c
nullstrcmp.c
out_of_memory.c

11
utils/nullcipher.c Normal file
View File

@ -0,0 +1,11 @@
/*
* Implementation of shared trivial routines that ssh_cipher
* implementations might use.
*/
#include "ssh.h"
void nullcipher_next_message(ssh_cipher *cipher)
{
/* Most ciphers don't do anything at all with this */
}

11
utils/nullmac.c Normal file
View File

@ -0,0 +1,11 @@
/*
* Implementation of shared trivial routines that ssh2_mac
* implementations might use.
*/
#include "ssh.h"
void nullmac_next_message(ssh2_mac *m)
{
/* Most MACs don't do anything at all with this */
}