Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5250416 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Herbert Xu
Browse files

crypto: ccp/des - switch to new verification routines

parent 43d81a8b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
#include <linux/crypto.h>
#include <crypto/algapi.h>
#include <crypto/scatterwalk.h>
#include <crypto/des.h>
#include <crypto/internal/des.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_crypto_ablkcipher_alg *alg =
		ccp_crypto_ablkcipher_alg(crypto_ablkcipher_tfm(tfm));
	u32 *flags = &tfm->base.crt_flags;
	int err;

	err = __des3_verify_key(flags, key);
	if (unlikely(err))
	err = verify_ablkcipher_des3_key(tfm, key);
	if (err)
		return err;

	/* It's not clear that there is any support for a keysize of 112.