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

Commit 88860c9e authored by David S. Miller's avatar David S. Miller
Browse files

xfrm_user: Remove zero length key checks.



The crypto layer will determine whether that is valid
or not.

Suggested by Herbert Xu, based upon a report and patch
by Martin Willi.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 51f82a2b
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -50,19 +50,8 @@ static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type)

	switch (type) {
	case XFRMA_ALG_AUTH:
		if (!algp->alg_key_len &&
		    strcmp(algp->alg_name, "digest_null") != 0)
			return -EINVAL;
		break;

	case XFRMA_ALG_CRYPT:
		if (!algp->alg_key_len &&
		    strcmp(algp->alg_name, "cipher_null") != 0)
			return -EINVAL;
		break;

	case XFRMA_ALG_COMP:
		/* Zero length keys are legal.  */
		break;

	default: