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

Rename SSH2_KEX_MAX_HASH_LEN to be more general.

I'm about to want to use it for purposes other than KEX, so it's now
just called MAX_HASH_LEN and is supposed to be an upper bound on any
hash function we implement at all. Of course this makes no difference
to its value, because the largest hash we have is SHA-512 which
already fit inside that limit.
This commit is contained in:
Simon Tatham
2019-01-02 22:00:23 +00:00
parent bcf6f52bf2
commit 38e0a3d22e
3 changed files with 6 additions and 6 deletions

View File

@ -727,9 +727,9 @@ static void oaep_mask(const struct ssh_hashalg *h, void *seed, int seedlen,
while (datalen > 0) {
int i, max = (datalen > h->hlen ? h->hlen : datalen);
ssh_hash *s;
unsigned char hash[SSH2_KEX_MAX_HASH_LEN];
unsigned char hash[MAX_HASH_LEN];
assert(h->hlen <= SSH2_KEX_MAX_HASH_LEN);
assert(h->hlen <= MAX_HASH_LEN);
s = ssh_hash_new(h);
put_data(s, seed, seedlen);
put_uint32(s, count);