Message ID | 1458859772-10573-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
This patch is a follow-up fix to a patch in this set. And oops, I forgot the buglink. To be added when applying: BugLink: http://bugs.launchpad.net/bugs/1556562 -Kamal On Thu, Mar 24, 2016 at 3:49 PM, Kamal Mostafa <kamal@canonical.com> wrote: > From: Ben Hutchings <ben@decadent.org.uk> > > 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> > Reference: http://article.gmane.org/gmane.linux.kernel.stable/169083 > Signed-off-by: Kamal Mostafa <kamal@canonical.com> > --- > crypto/ablkcipher.c | 1 + > crypto/blkcipher.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c > index 71b4b2e..13836be 100644 > --- a/crypto/ablkcipher.c > +++ b/crypto/ablkcipher.c > @@ -459,6 +459,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 8cc1622..79978da 100644 > --- a/crypto/blkcipher.c > +++ b/crypto/blkcipher.c > @@ -472,6 +472,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; > } > -- > 2.7.0 > > > -- > kernel-team mailing list > kernel-team@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 71b4b2e..13836be 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -459,6 +459,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 8cc1622..79978da 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -472,6 +472,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; }