1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

`Leonid' points out a stupid mistake in MD5 HMAC initialisation: we

should initialise _both_ MD5 states, not the same one twice.

[originally from svn r2341]
This commit is contained in:
Simon Tatham 2002-12-18 09:54:55 +00:00
parent 29b0705961
commit 801832bf59

View File

@ -233,8 +233,8 @@ static void md5_key_internal(void *handle, unsigned char *key, int len)
memset(foo, 0x5C, 64);
for (i = 0; i < len && i < 64; i++)
foo[i] ^= key[i];
MD5Init(&keys[0]);
MD5Update(&keys[0], foo, 64);
MD5Init(&keys[1]);
MD5Update(&keys[1], foo, 64);
memset(foo, 0, 64); /* burn the evidence */
}