diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2018-12-20 15:35:07 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2018-12-20 15:35:07 +0100 |
commit | 6e603ea6e028001e3d56dc56822cb9c1cf2908f9 (patch) | |
tree | ecde2ff65bcb3ef7f0379d9ccc5eb30d6033f8f3 /crypto/xcbc.c | |
parent | 50d4fb1dc129955ab571c1dd7bf14cd07cc5984d (diff) | |
parent | 7271e588c712517a184f75744b6e94d05c8251a4 (diff) | |
download | linux-crypto-6e603ea6e028001e3d56dc56822cb9c1cf2908f9.tar.gz linux-crypto-6e603ea6e028001e3d56dc56822cb9c1cf2908f9.zip |
Merge tag 'v4.20-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 4.20-rc7
Sync with upstream (which now contains fbdev-v4.20 changes) to
prepare a base for fbdev-v4.21 changes.
Diffstat (limited to 'crypto/xcbc.c')
-rw-r--r-- | crypto/xcbc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/xcbc.c b/crypto/xcbc.c index 25c75af5..c055f57f 100644 --- a/crypto/xcbc.c +++ b/crypto/xcbc.c @@ -57,15 +57,17 @@ struct xcbc_desc_ctx { u8 ctx[]; }; +#define XCBC_BLOCKSIZE 16 + static int crypto_xcbc_digest_setkey(struct crypto_shash *parent, const u8 *inkey, unsigned int keylen) { unsigned long alignmask = crypto_shash_alignmask(parent); struct xcbc_tfm_ctx *ctx = crypto_shash_ctx(parent); - int bs = crypto_shash_blocksize(parent); u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); int err = 0; - u8 key1[bs]; + u8 key1[XCBC_BLOCKSIZE]; + int bs = sizeof(key1); if ((err = crypto_cipher_setkey(ctx->child, inkey, keylen))) return err; @@ -212,7 +214,7 @@ static int xcbc_create(struct crypto_template *tmpl, struct rtattr **tb) return PTR_ERR(alg); switch(alg->cra_blocksize) { - case 16: + case XCBC_BLOCKSIZE: break; default: goto out_put_alg; |