Skip to contentSkip to conversation

crypto: shash - Test for the algorithms import function before exporting it

PATCH In review Steffen Klassert 2 participants 2 messages Jul 22, 2009 – Jul 24, 2009 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 crypto/shash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
crypto/shash.c +1 -1
index 7713b52..d923c88 100644
@@ -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);
Signature · 1 line
1.5.4.2
maintainer
#1 lore raw
Quoted 5 lines · Steffen Klassert

crypto_init_shash_ops_async() tests for setkey and not for import before exporting the algorithms import function to ahash. This patch fixes this.

Patch applied. Thanks!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt