summaryrefslogtreecommitdiff
path: root/crypto/shash.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2009-07-24 13:57:13 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-24 13:57:13 +0800
commit2e39ef1c2371cb5fbdd2bccf5d79bf7fc9ed0a48 (patch)
treee66004ad90ac581369f63119575191283c42f268 /crypto/shash.c
parentff3a3f295bbde4daec55a4dc2100cac82a0847d2 (diff)
downloadlinux-crypto-2e39ef1c2371cb5fbdd2bccf5d79bf7fc9ed0a48.tar.gz
linux-crypto-2e39ef1c2371cb5fbdd2bccf5d79bf7fc9ed0a48.zip
crypto: shash - Test for the algorithms import function before exporting it
crypto_init_shash_ops_async() tests for setkey and not for import before exporting the algorithms import function to ahash. This patch fixes this. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/shash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index 98b7f46c..91f7b9d8 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -350,7 +350,7 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm)
crt->setkey = shash_async_setkey;
if (alg->export)
crt->export = shash_async_export;
- if (alg->setkey)
+ if (alg->import)
crt->import = shash_async_import;
crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash);