crypto: caam - fix DKP detection logic
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 6 May 2019 06:39:44 +0000 (14:39 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 May 2019 05:17:56 +0000 (13:17 +0800)
commit24586b5feaf17ecf85ae6259fe3ea7815dee432d
tree3ef729182d3fd15c93065876c0715a3f81ea65de
parent0816ecf48f3db608044bdb3f5b72c650a7ebec67
crypto: caam - fix DKP detection logic

The detection for DKP (Derived Key Protocol) relied on the value
of the setkey function.  This was broken by the recent change which
added des3_aead_setkey.

This patch fixes this by introducing a new flag for DKP and setting
that where needed.

Fixes: 1b52c40919e6 ("crypto: caam - Forbid 2-key 3DES in FIPS mode")
Reported-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c