crypto: caam - fix non-hmac hashes
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 9 Aug 2016 07:27:17 +0000 (08:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2016 06:32:38 +0000 (08:32 +0200)
commite0a9e843cad4aaacc1e806d0f57c69fae79c4197
treee1f5ac6936b9d34c7e3b47b7be7f1aa32278c107
parent6722e247878e1a6ba99be420a062611d7b6361c5
crypto: caam - fix non-hmac hashes

commit a0118c8b2be9297aed8e915c60b4013326b256d4 upstream.

Since 6de62f15b581 ("crypto: algif_hash - Require setkey before
accept(2)"), the AF_ALG interface requires userspace to provide a key
to any algorithm that has a setkey method.  However, the non-HMAC
algorithms are not keyed, so setting a key is unnecessary.

Fix this by removing the setkey method from the non-keyed hash
algorithms.

Fixes: 6de62f15b581 ("crypto: algif_hash - Require setkey before accept(2)")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/caam/caamhash.c