Commit 0044f3ed authored by Steffen Klassert's avatar Steffen Klassert Committed by Herbert Xu

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: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5befbd5a
...@@ -350,7 +350,7 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm) ...@@ -350,7 +350,7 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm)
crt->setkey = shash_async_setkey; crt->setkey = shash_async_setkey;
if (alg->export) if (alg->export)
crt->export = shash_async_export; crt->export = shash_async_export;
if (alg->setkey) if (alg->import)
crt->import = shash_async_import; crt->import = shash_async_import;
crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash); crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment