]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - check assoclen for rfc4543
authorIuliana Prodan <iuliana.prodan@nxp.com>
Fri, 19 Jul 2019 07:09:23 +0000 (10:09 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 27 Jul 2019 11:08:36 +0000 (21:08 +1000)
commit0581727ca3c806756d1993cb72b9039359e94d73
tree0e74913b0366869b5b73ecbb0e8bbdf72b76a95e
parent013787c5e9d793fefab815807b952f91117dba70
crypto: ccree - check assoclen for rfc4543

Check assoclen to solve the extra tests that expect -EINVAL to be
returned when the associated data size is not valid.

Validated assoclen for RFC4543 which expects an assoclen
of 16 or 20, the same as RFC4106.
Based on seqiv, IPsec ESP and RFC4543/RFC4106 the assoclen is sizeof
IP Header (spi, seq_no, extended seq_no) and IV len. This can be 16 or
20 bytes.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_aead.c