crypto: shash - Fix has_key setting
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 26 Jan 2016 16:16:37 +0000 (00:16 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:28 +0000 (15:45 -0500)
commit73f876ae98498f5a929053e4d402062a5516aa73
tree4c0302b3b0d9fc65eb9ef44071320f13351e269d
parent505a9f25a6c33070eb51ea50aabf168b8aafa6d1
crypto: shash - Fix has_key setting

[ Upstream commit 00420a65fa2beb3206090ead86942484df2275f3 ]

The has_key logic is wrong for shash algorithms as they always
have a setkey function.  So we should instead be testing against
shash_no_setkey.

Fixes: a5596d633278 ("crypto: hash - Add crypto_ahash_has_setkey")
Cc: stable@vger.kernel.org
Reported-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
crypto/shash.c