From 2c3278116402a01078c688d5ca2a1ab247212e35 Mon Sep 17 00:00:00 2001 From: Clement Faure Date: Wed, 5 Apr 2023 16:49:03 +0200 Subject: [PATCH] [FIO fromtree] drivers: caam: disable CFG_CRYPTO_SM2_* when ECC CAAM driver is enabled Disable CFG_CRYPTO_SM2_PKE and CFG_CRYPTO_SM2_KEP as ECC CAAM driver does not support ECC encryption. Disable CFG_CRYPTO_SM2_DSA as ECC CAAM driver does not support ECC SM2 signature. This is a temporary fix until a proper software crypto fallback is implemented. Signed-off-by: Clement Faure Acked-by: Jerome Forissier Acked-by: Etienne Carriere Acked-by: Jens Wiklander (cherry picked from commit 3489781e9072497f501511128da5ab7e9b9d84a3) Signed-off-by: Ricardo Salveti --- core/drivers/crypto/caam/crypto.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/drivers/crypto/caam/crypto.mk b/core/drivers/crypto/caam/crypto.mk index 0cd008a41c5..66d536fdb0e 100644 --- a/core/drivers/crypto/caam/crypto.mk +++ b/core/drivers/crypto/caam/crypto.mk @@ -175,5 +175,12 @@ $(call force, CFG_NXP_CAAM_ACIPHER_DRV, $(call cryphw-one-enabled, RSA ECC DH DS $(call force, CFG_CRYPTO_DRV_MAC, $(call cryphw-one-enabled, HMAC CMAC)) CFG_CRYPTO_DRV_ACIPHER ?= $(CFG_NXP_CAAM_ACIPHER_DRV) +# Disable SM2 as it is not supported by the CAAM driver +ifeq ($(CFG_NXP_CAAM_ECC_DRV),y) +$(call force,CFG_CRYPTO_SM2_PKE,n) +$(call force,CFG_CRYPTO_SM2_KEP,n) +$(call force,CFG_CRYPTO_SM2_DSA,n) +endif + endif # CFG_CRYPTO_DRIVER endif # CFG_NXP_CAAM \ No newline at end of file