summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-01-11 21:26:50 +0800
committerLuis Henriques <luis.henriques@canonical.com>2016-02-24 14:31:26 +0000
commit05b93b57b60b3461726019eeba7a45500b889573 (patch)
tree831cf6517d6be748580e02077e2e427c2bf44cd7 /crypto
parentf9df3480ae222aedc99f1a0a4a5b5089c9391373 (diff)
downloadlinux-stable-05b93b57b60b3461726019eeba7a45500b889573.tar.gz
linux-stable-05b93b57b60b3461726019eeba7a45500b889573.tar.bz2
linux-stable-05b93b57b60b3461726019eeba7a45500b889573.zip
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> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ablkcipher.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index f02fdbefb2c6..5da16526c890 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -375,6 +375,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;
}