OSDN Git Service

mptcp: use SHA256_BLOCK_SIZE, not SHA_MESSAGE_BYTES
authorEric Biggers <ebiggers@google.com>
Sat, 2 May 2020 18:24:21 +0000 (11:24 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 May 2020 05:32:16 +0000 (15:32 +1000)
commitac0ad93df7136e27d2a9c5ec554547695f581d0e
tree315b2ec5ba6d42a94649271d3831a014f2eb9b28
parent85fc78b80f15d723db3aa8f368b414ee70a1937c
mptcp: use SHA256_BLOCK_SIZE, not SHA_MESSAGE_BYTES

In preparation for naming the SHA-1 stuff in <linux/cryptohash.h>
properly and moving it to a more appropriate header, fix the HMAC-SHA256
code in mptcp_crypto_hmac_sha() to use SHA256_BLOCK_SIZE instead of
"SHA_MESSAGE_BYTES" which is actually the SHA-1 block size.
(Fortunately these are both 64 bytes, so this wasn't a "real" bug...)

Cc: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.01.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
net/mptcp/crypto.c