From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: [PATCH] crypto: shash - Test for the algorithms import function before exporting it
Date: Wed, 22 Jul 2009 14:53:02 +0200 [thread overview]
Message-ID: <20090722125302.GM20288@secunet.com> (raw)
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>
---
crypto/shash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/crypto/shash.c b/crypto/shash.c
index 7713b52..d923c88 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -348,7 +348,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);
--
1.5.4.2
next reply other threads:[~2009-07-22 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 12:53 Steffen Klassert [this message]
2009-07-24 5:57 ` [PATCH] crypto: shash - Test for the algorithms import function before exporting it Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090722125302.GM20288@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox