]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: marvell/cesa - fix wrong hash results
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 9 Oct 2015 19:43:48 +0000 (20:43 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Oct 2015 14:23:18 +0000 (22:23 +0800)
commit5277f3549fddc0c5251baa089bbb1390da3bb552
tree03f4ab7fd95fa76c1017c371da99692bf34e9f1e
parent1dc91a57bf449f2d112661c81b5f18e01d54a576
crypto: marvell/cesa - fix wrong hash results

Attempting to use the sha1 digest for openssh via openssl reveals that
the result from the hash is wrong: this happens when we export the
state from one socket and import it into another via calling accept().

The reason for this is because the operation is reset to "initial block"
state, whereas we may be past the first fragment of data to be hashed.

Arrange for the operation code to avoid the initialisation of the state,
thereby preserving the imported state.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/hash.c