aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2009-07-24 01:57:13 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-24 01:57:13 -0400
commit0044f3eda9a778ab63c2a5eafede3803f01b0b97 (patch)
treefae187f93d87b003a7446537097cd50cd22707e9
parent5befbd5a7e9c814d145f15b4281c88da96fb1aa9 (diff)
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>
-rw-r--r--crypto/shash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index 98b7f46ca1ed..91f7b9d83881 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -350,7 +350,7 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm)
350 crt->setkey = shash_async_setkey; 350 crt->setkey = shash_async_setkey;
351 if (alg->export) 351 if (alg->export)
352 crt->export = shash_async_export; 352 crt->export = shash_async_export;
353 if (alg->setkey) 353 if (alg->import)
354 crt->import = shash_async_import; 354 crt->import = shash_async_import;
355 355
356 crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash); 356 crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash);