diff options
author | Eric Biggers <ebiggers@google.com> | 2019-01-04 05:16:21 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-01-11 07:16:58 +0100 |
commit | fb6de25c3bdb8cee3c0807bb09a7cd8ec017ab97 (patch) | |
tree | 97cd4e634aaaef8e7eeeb1912254af5f45770c98 /crypto/pcbc.c | |
parent | crypto: ofb - convert to skcipher_alloc_instance_simple() (diff) | |
download | linux-fb6de25c3bdb8cee3c0807bb09a7cd8ec017ab97.tar.xz linux-fb6de25c3bdb8cee3c0807bb09a7cd8ec017ab97.zip |
crypto: pcbc - remove ability to wrap internal ciphers
Following commit 944585a64f5e ("crypto: x86/aes-ni - remove special
handling of AES in PCBC mode"), it's no longer needed for the PCBC
template to support wrapping a cipher that has the CRYPTO_ALG_INTERNAL
flag set. Thus, remove this now-unused functionality to make PCBC
consistent with the other single block cipher templates.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/pcbc.c')
-rw-r--r-- | crypto/pcbc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crypto/pcbc.c b/crypto/pcbc.c index 1b182dfedc94..4f97a9d069b6 100644 --- a/crypto/pcbc.c +++ b/crypto/pcbc.c @@ -219,18 +219,15 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb) if (IS_ERR(algt)) return PTR_ERR(algt); - if (((algt->type ^ CRYPTO_ALG_TYPE_SKCIPHER) & algt->mask) & - ~CRYPTO_ALG_INTERNAL) + if ((algt->type ^ CRYPTO_ALG_TYPE_SKCIPHER) & algt->mask) return -EINVAL; inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); if (!inst) return -ENOMEM; - alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER | - (algt->type & CRYPTO_ALG_INTERNAL), - CRYPTO_ALG_TYPE_MASK | - (algt->mask & CRYPTO_ALG_INTERNAL)); + alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, + CRYPTO_ALG_TYPE_MASK); err = PTR_ERR(alg); if (IS_ERR(alg)) goto err_free_inst; @@ -245,7 +242,6 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb) if (err) goto err_drop_spawn; - inst->alg.base.cra_flags = alg->cra_flags & CRYPTO_ALG_INTERNAL; inst->alg.base.cra_priority = alg->cra_priority; inst->alg.base.cra_blocksize = alg->cra_blocksize; inst->alg.base.cra_alignmask = alg->cra_alignmask; |