diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-01-11 21:26:50 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-02-13 10:34:12 +0000 |
commit | 3ba1945b048afd9cd8dba6b341160fffc4e431a0 (patch) | |
tree | e9aa1d1427e66cbb8f576a7d0109d960b7aba76e /crypto | |
parent | 5d4c935b8a1ea8bb0efed11b204de06f96fdb6b1 (diff) |
crypto: skcipher - Add crypto_skcipher_has_setkey
commit a1383cd86a062fc798899ab20f0ec2116cce39cb upstream.
This patch adds a way for skcipher users to determine whether a key
is required by a transform.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[bwh: Backported to 3.2: add to ablkcipher API instead]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ablkcipher.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 6eb6eb122502..6600a2a15b6b 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -379,6 +379,7 @@ static int crypto_init_ablkcipher_ops(struct crypto_tfm *tfm, u32 type, } crt->base = __crypto_ablkcipher_cast(tfm); crt->ivsize = alg->ivsize; + crt->has_setkey = alg->max_keysize; return 0; } |