diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-03-06 19:52:46 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-04-01 01:54:31 +0100 |
commit | 16b059733afec75695550c0cfa3b116f79c54720 (patch) | |
tree | 907eae953fdec78a1946655b31a02d67934a2503 /crypto | |
parent | d0c73ef2830a952e0bf2b5618a6d50b9d21fdfc2 (diff) | |
download | linux-rt-16b059733afec75695550c0cfa3b116f79c54720.tar.gz |
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().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ablkcipher.c | 1 | ||||
-rw-r--r-- | crypto/blkcipher.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 6600a2a15b6b..3ad43ad6586e 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -461,6 +461,7 @@ static int crypto_init_givcipher_ops(struct crypto_tfm *tfm, u32 type, crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt; crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize; return 0; } diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 3041504370b1..7b69d7a902a9 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -458,6 +458,7 @@ static int crypto_init_blkcipher_ops_async(struct crypto_tfm *tfm) } crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize; return 0; } |