summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorRadu Solea <radu.solea@nxp.com>2017-04-19 18:19:14 +0300
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit8812fd007252303be5dba56eb2ebd36dd4e2bc90 (patch)
tree7563ac4473c42fda13fb9b95d72ad1ad372a1399 /drivers/crypto
parentd33ad5ad33ea373902c5144e638856d555211c88 (diff)
MLK-14611 Fix xcbc unkeyed registration
AES is a keyed algorithm, XCBC-AES needs a key for operation, this patch prevents the registration of AES-based transforms as unkeyed operations. Signed-off-by: Radu Solea <radu.solea@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamhash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index 7beebc757c91..c0fe91d80ef5 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -2323,6 +2323,9 @@ static int __init caam_algapi_hash_init(void)
} else
list_add_tail(&t_alg->entry, &hash_list);
+ if (alg->alg_op == OP_ALG_ALGSEL_AES)
+ continue;
+
/* register unkeyed version */
t_alg = caam_hash_alloc(alg, false);
if (IS_ERR(t_alg)) {