crypto: {blk,giv}cipher: Set has_setkey
PATCH 1/1 crypto: {blk,giv}cipher: Set has_setkey
Commit a1383cd86a06 ("crypto: skcipher - Add crypto_skcipher_has_setkey") was incorrectly backported to the 3.2.y and 3.16.y stable branches. We need to set ablkcipher_tfm::has_setkey in the crypto_init_blkcipher_ops_async() and crypto_init_givcipher_ops() functions as well as crypto_init_ablkcipher_ops().
---
crypto/ablkcipher.c +1 -0
@@ -457,6 +457,7 @@ static int crypto_init_givcipher_ops(str crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt; crt->base =__crypto_ablkcipher_cast (tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize;return 0 ; }
crypto/blkcipher.c +1 -0
@@ -471,6 +471,7 @@ static int crypto_init_blkcipher_ops_asy } crt->base =__crypto_ablkcipher_cast (tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize;return 0 ; }
Quoted 21 lines · Ben Hutchings
Commit
a1383cd86a06("crypto: skcipher - Addcrypto_skcipher_has_setkey") was incorrectly backported to the 3.2.y and 3.16.y stable branches. We need to setablkcipher_tfm::has_setkeyin thecrypto_init_blkcipher_ops_async()andcrypto_init_givcipher_ops()functions as well ascrypto_init_ablkcipher_ops().Signed-off-by Ben Hutchings <[email protected]>---
crypto/ablkcipher.c +1
-0@@ -457,6 +457,7 @@ static int crypto_init_givcipher_ops(str crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt; crt->base =__crypto_ablkcipher_cast (tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize;return 0 ; }
crypto/blkcipher.c static int crypto_init_blkcipher_ops_asy · line 477
Quoted 7 lines
crypto/blkcipher.c +1
-0@@ -471,6 +471,7 @@ static int crypto_init_blkcipher_ops_asy } crt->base =__crypto_ablkcipher_cast (tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize;return 0 ; }
Thanks Ben, queuing it for the 3.16 kernel.
Cheers,
--
Lu�s