From 033f61370af38c6397963075ac2477f3192714b9 Mon Sep 17 00:00:00 2001 From: Manish V Badarkhe Date: Thu, 27 Jan 2022 13:50:23 +0000 Subject: [PATCH] refactor(mbedtls): allow platform to specify their config file Common mbedTLS implementation include the fixed configuration file of mbedTLS and that does not gives flexilibility to the platform to include their own mbedTLS configuration. Hence changes are done so that platform can include their own mbedTLS configuration file. Signed-off-by: Lucian Paul-Trifu Signed-off-by: Manish V Badarkhe Change-Id: I04546589f67299e26b0a6a6e151cdf1fdb302607 --- drivers/auth/dualroot/cot.c | 4 ++-- drivers/auth/mbedtls/mbedtls_common.c | 4 ++-- drivers/auth/mbedtls/mbedtls_common.mk | 4 ++-- drivers/auth/tbbr/tbbr_cot_bl1.c | 4 ++-- drivers/auth/tbbr/tbbr_cot_bl1_r64.c | 4 ++-- drivers/auth/tbbr/tbbr_cot_bl2.c | 4 ++-- drivers/auth/tbbr/tbbr_cot_common.c | 4 ++-- lib/fconf/fconf_cot_getter.c | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/auth/dualroot/cot.c b/drivers/auth/dualroot/cot.c index e1e47bca0..836850361 100644 --- a/drivers/auth/dualroot/cot.c +++ b/drivers/auth/dualroot/cot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Arm Limited. All rights reserved. + * Copyright (c) 2020-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,7 +8,7 @@ #include -#include +#include MBEDTLS_CONFIG_FILE #include #include diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c index 4a8efaebb..a12e49c6a 100644 --- a/drivers/auth/mbedtls/mbedtls_common.c +++ b/drivers/auth/mbedtls/mbedtls_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -13,7 +13,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include static void cleanup(void) diff --git a/drivers/auth/mbedtls/mbedtls_common.mk b/drivers/auth/mbedtls/mbedtls_common.mk index 54c819c19..0a4775d00 100644 --- a/drivers/auth/mbedtls/mbedtls_common.mk +++ b/drivers/auth/mbedtls/mbedtls_common.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2021, Arm Limited. All rights reserved. +# Copyright (c) 2015-2022, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -16,7 +16,7 @@ endif MBEDTLS_INC = -I${MBEDTLS_DIR}/include # Specify mbed TLS configuration file -MBEDTLS_CONFIG_FILE := "" +MBEDTLS_CONFIG_FILE ?= "" $(eval $(call add_define,MBEDTLS_CONFIG_FILE)) MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c diff --git a/drivers/auth/tbbr/tbbr_cot_bl1.c b/drivers/auth/tbbr/tbbr_cot_bl1.c index e4c92213a..44f86384f 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl1.c +++ b/drivers/auth/tbbr/tbbr_cot_bl1.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include #include diff --git a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c b/drivers/auth/tbbr/tbbr_cot_bl1_r64.c index e8e017c8d..78e38f6bb 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c +++ b/drivers/auth/tbbr/tbbr_cot_bl1_r64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include #if USE_TBBR_DEFS diff --git a/drivers/auth/tbbr/tbbr_cot_bl2.c b/drivers/auth/tbbr/tbbr_cot_bl2.c index 65a0478ab..11e2f4678 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl2.c +++ b/drivers/auth/tbbr/tbbr_cot_bl2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include #include diff --git a/drivers/auth/tbbr/tbbr_cot_common.c b/drivers/auth/tbbr/tbbr_cot_common.c index ff3f22de1..0983d4219 100644 --- a/drivers/auth/tbbr/tbbr_cot_common.c +++ b/drivers/auth/tbbr/tbbr_cot_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include #include diff --git a/lib/fconf/fconf_cot_getter.c b/lib/fconf/fconf_cot_getter.c index adfa5341c..ae59d8c96 100644 --- a/lib/fconf/fconf_cot_getter.c +++ b/lib/fconf/fconf_cot_getter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Arm Limited. All rights reserved. + * Copyright (c) 2020-2022, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,7 +8,7 @@ #include #include -#include +#include MBEDTLS_CONFIG_FILE #include #include #include