crypto: ccp/des - switch to new verification routines

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Ard Biesheuvel 2019-08-15 12:00:51 +03:00 коммит произвёл Herbert Xu
Родитель 43d81a8b25
Коммит b525041633
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -14,7 +14,7 @@
#include <linux/crypto.h> #include <linux/crypto.h>
#include <crypto/algapi.h> #include <crypto/algapi.h>
#include <crypto/scatterwalk.h> #include <crypto/scatterwalk.h>
#include <crypto/des.h> #include <crypto/internal/des.h>
#include "ccp-crypto.h" #include "ccp-crypto.h"
@ -39,11 +39,10 @@ static int ccp_des3_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ablkcipher_tfm(tfm)); struct ccp_ctx *ctx = crypto_tfm_ctx(crypto_ablkcipher_tfm(tfm));
struct ccp_crypto_ablkcipher_alg *alg = struct ccp_crypto_ablkcipher_alg *alg =
ccp_crypto_ablkcipher_alg(crypto_ablkcipher_tfm(tfm)); ccp_crypto_ablkcipher_alg(crypto_ablkcipher_tfm(tfm));
u32 *flags = &tfm->base.crt_flags;
int err; int err;
err = __des3_verify_key(flags, key); err = verify_ablkcipher_des3_key(tfm, key);
if (unlikely(err)) if (err)
return err; return err;
/* It's not clear that there is any support for a keysize of 112. /* It's not clear that there is any support for a keysize of 112.