diff options
| author | Govindraj Raja <govindraj.raja@arm.com> | 2023-02-28 11:37:02 +0000 |
|---|---|---|
| committer | Govindraj Raja <govindraj.raja@arm.com> | 2023-03-01 12:51:43 +0000 |
| commit | a9edc32c8964ffe047909b4847edd710b5879f35 (patch) | |
| tree | 038c9b9d17c85033b04e4f9c021217746e1d42f8 | |
| parent | 55d5c6a16ab69b2c99aedbd1aa0d3e58350f4380 (diff) | |
| download | arm-trusted-firmware-a9edc32c8964ffe047909b4847edd710b5879f35.tar.gz | |
fix(mbedtls): fix mbedtls coverity issues
commit (a8eadc51a refactor(mbedtls): avoid including
MBEDTLS_CONFIG_FILE) avoids using config file directly and relies on
config file usage from mbedtls version.h
But we could build trusted boot without mbedtls dir so guard version.h
include in cot_def.h with availability of config file.
Also we refactored in same commit to break dependencies between
auth_mod.h and cot_def.h, So add cot_def.h include in nxp tbbr
cot file.
Change-Id: I4779e90c18f04c73d2121c88df6420b4b1109c8b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
| -rw-r--r-- | drivers/nxp/auth/tbbr/tbbr_cot.c | 3 | ||||
| -rw-r--r-- | include/common/tbbr/cot_def.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/nxp/auth/tbbr/tbbr_cot.c b/drivers/nxp/auth/tbbr/tbbr_cot.c index bb21fa04c..ac4595f02 100644 --- a/drivers/nxp/auth/tbbr/tbbr_cot.c +++ b/drivers/nxp/auth/tbbr/tbbr_cot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. * * Copyright 2020 NXP * @@ -8,6 +8,7 @@ #include <stddef.h> +#include <common/tbbr/cot_def.h> #include <drivers/auth/auth_mod.h> #if USE_TBBR_DEFS diff --git a/include/common/tbbr/cot_def.h b/include/common/tbbr/cot_def.h index 7823ff3ec..822c474d5 100644 --- a/include/common/tbbr/cot_def.h +++ b/include/common/tbbr/cot_def.h @@ -7,7 +7,14 @@ #ifndef COT_DEF_H #define COT_DEF_H +/* + * Guard here with availability of mbedtls config since PLAT=lx2162aqds + * uses custom tbbr from 'drivers/nxp/auth/tbbr/tbbr_cot.c' and also may + * build without mbedtls folder only with TRUSTED_BOOT enabled. + */ +#ifdef MBEDTLS_CONFIG_FILE #include <mbedtls/version.h> +#endif /* TBBR CoT definitions */ #if defined(SPD_spmd) |
