Skip to content

Commit

Permalink
crypto: shash - Test for the algorithms import function before export…
Browse files Browse the repository at this point in the history
…ing 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>
  • Loading branch information
klassert authored and herbertx committed Jul 24, 2009
1 parent 5befbd5 commit 0044f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/shash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0044f3e

Please sign in to comment.