aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/auth
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/auth')
-rw-r--r--drivers/auth/auth_mod.c18
-rw-r--r--drivers/auth/crypto_mod.c5
-rw-r--r--drivers/auth/cryptocell/cryptocell_crypto.c26
-rw-r--r--drivers/auth/cryptocell/cryptocell_crypto.mk4
-rw-r--r--drivers/auth/img_parser_mod.c9
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.c12
-rw-r--r--drivers/auth/mbedtls/mbedtls_common.mk3
-rw-r--r--drivers/auth/mbedtls/mbedtls_crypto.c9
-rw-r--r--drivers/auth/mbedtls/mbedtls_x509_parser.c9
-rw-r--r--drivers/auth/tbbr/tbbr_cot.c7
10 files changed, 55 insertions, 47 deletions
diff --git a/drivers/auth/auth_mod.c b/drivers/auth/auth_mod.c
index eb537b66a..1b8ff82bc 100644
--- a/drivers/auth/auth_mod.c
+++ b/drivers/auth/auth_mod.c
@@ -5,17 +5,19 @@
*/
#include <assert.h>
-#include <auth_common.h>
-#include <auth_mod.h>
-#include <cot_def.h>
-#include <crypto_mod.h>
-#include <debug.h>
-#include <img_parser_mod.h>
-#include <platform.h>
-#include <platform_def.h>
#include <stdint.h>
#include <string.h>
+#include <platform_def.h>
+
+#include <common/debug.h>
+#include <common/tbbr/cot_def.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/auth_mod.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <plat/common/platform.h>
+
/* ASN.1 tags */
#define ASN1_INTEGER 0x02
diff --git a/drivers/auth/crypto_mod.c b/drivers/auth/crypto_mod.c
index 4cd05506b..5e5ac2b03 100644
--- a/drivers/auth/crypto_mod.c
+++ b/drivers/auth/crypto_mod.c
@@ -5,8 +5,9 @@
*/
#include <assert.h>
-#include <crypto_mod.h>
-#include <debug.h>
+
+#include <common/debug.h>
+#include <drivers/auth/crypto_mod.h>
/* Variable exported by the crypto library through REGISTER_CRYPTO_LIB() */
diff --git a/drivers/auth/cryptocell/cryptocell_crypto.c b/drivers/auth/cryptocell/cryptocell_crypto.c
index 80c10933e..a507d0a42 100644
--- a/drivers/auth/cryptocell/cryptocell_crypto.c
+++ b/drivers/auth/cryptocell/cryptocell_crypto.c
@@ -4,20 +4,22 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
-#include <crypto_driver.h>
-#include <crypto_mod.h>
-#include <debug.h>
-#include <mbedtls_common.h>
-#include <platform_def.h>
-#include <rsa.h>
-#include <sbrom_bsv_api.h>
-#include <secureboot_base_func.h>
-#include <secureboot_gen_defs.h>
#include <stddef.h>
#include <string.h>
-#include <util.h>
-#include <utils.h>
+
+#include <platform_def.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/cryptocell/crypto_driver.h>
+#include <drivers/arm/cryptocell/rsa.h>
+#include <drivers/arm/cryptocell/sbrom_bsv_api.h>
+#include <drivers/arm/cryptocell/secureboot_base_func.h>
+#include <drivers/arm/cryptocell/secureboot_gen_defs.h>
+#include <drivers/arm/cryptocell/util.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <lib/utils.h>
#include <mbedtls/oid.h>
diff --git a/drivers/auth/cryptocell/cryptocell_crypto.mk b/drivers/auth/cryptocell/cryptocell_crypto.mk
index a88dcfc57..a631829fd 100644
--- a/drivers/auth/cryptocell/cryptocell_crypto.mk
+++ b/drivers/auth/cryptocell/cryptocell_crypto.mk
@@ -20,9 +20,7 @@ endif
TF_LDFLAGS += -L$(CCSBROM_LIB_PATH)
LDLIBS += -lcc_712sbromx509
-INCLUDES += -Iinclude/drivers/arm/cryptocell
-
CRYPTOCELL_SOURCES := drivers/auth/cryptocell/cryptocell_crypto.c
BL1_SOURCES += ${CRYPTOCELL_SOURCES}
-BL2_SOURCES += ${CRYPTOCELL_SOURCES} \ No newline at end of file
+BL2_SOURCES += ${CRYPTOCELL_SOURCES}
diff --git a/drivers/auth/img_parser_mod.c b/drivers/auth/img_parser_mod.c
index 63160141d..c4688f867 100644
--- a/drivers/auth/img_parser_mod.c
+++ b/drivers/auth/img_parser_mod.c
@@ -5,14 +5,15 @@
*/
#include <assert.h>
-#include <auth_common.h>
-#include <debug.h>
#include <errno.h>
-#include <img_parser_mod.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
-#include <utils_def.h>
+
+#include <common/debug.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <lib/utils_def.h>
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START);
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END);
diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c
index dbf45baeb..b6d02fd10 100644
--- a/drivers/auth/mbedtls/mbedtls_common.c
+++ b/drivers/auth/mbedtls/mbedtls_common.c
@@ -5,14 +5,16 @@
*/
#include <assert.h>
-#include <debug.h>
+#include <stddef.h>
+
/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>
-#include <mbedtls_common.h>
-#include <mbedtls_config.h>
-#include <platform.h>
-#include <stddef.h>
+
+#include <common/debug.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <drivers/auth/mbedtls/mbedtls_config.h>
+#include <plat/common/platform.h>
static void cleanup(void)
{
diff --git a/drivers/auth/mbedtls/mbedtls_common.mk b/drivers/auth/mbedtls/mbedtls_common.mk
index cfbd86ab9..63e65bd47 100644
--- a/drivers/auth/mbedtls/mbedtls_common.mk
+++ b/drivers/auth/mbedtls/mbedtls_common.mk
@@ -14,10 +14,9 @@ ifeq (${MBEDTLS_DIR},)
endif
MBEDTLS_INC = -I${MBEDTLS_DIR}/include
-INCLUDES += -Iinclude/drivers/auth/mbedtls
# Specify mbed TLS configuration file
-MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>"
+MBEDTLS_CONFIG_FILE := "<drivers/auth/mbedtls/mbedtls_config.h>"
$(eval $(call add_define,MBEDTLS_CONFIG_FILE))
MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c
diff --git a/drivers/auth/mbedtls/mbedtls_crypto.c b/drivers/auth/mbedtls/mbedtls_crypto.c
index bc9ed3a85..33420fbbd 100644
--- a/drivers/auth/mbedtls/mbedtls_crypto.c
+++ b/drivers/auth/mbedtls/mbedtls_crypto.c
@@ -4,10 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <crypto_mod.h>
-#include <debug.h>
-#include <mbedtls_common.h>
-#include <mbedtls_config.h>
#include <stddef.h>
#include <string.h>
@@ -17,6 +13,11 @@
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
+#include <common/debug.h>
+#include <drivers/auth/crypto_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <drivers/auth/mbedtls/mbedtls_config.h>
+
#define LIB_NAME "mbed TLS"
/*
diff --git a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/drivers/auth/mbedtls/mbedtls_x509_parser.c
index bda1208af..129566bd6 100644
--- a/drivers/auth/mbedtls/mbedtls_x509_parser.c
+++ b/drivers/auth/mbedtls/mbedtls_x509_parser.c
@@ -12,20 +12,21 @@
* extensions field, such as an image hash or a public key.
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <img_parser_mod.h>
-#include <mbedtls_common.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
-#include <utils.h>
/* mbed TLS headers */
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
+#include <arch_helpers.h>
+#include <drivers/auth/img_parser_mod.h>
+#include <drivers/auth/mbedtls/mbedtls_common.h>
+#include <lib/utils.h>
+
/* Maximum OID string length ("a.b.c.d.e.f ...") */
#define MAX_OID_STR_LEN 64
diff --git a/drivers/auth/tbbr/tbbr_cot.c b/drivers/auth/tbbr/tbbr_cot.c
index a950a7a8d..ec14a185d 100644
--- a/drivers/auth/tbbr/tbbr_cot.c
+++ b/drivers/auth/tbbr/tbbr_cot.c
@@ -4,12 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <auth_mod.h>
-#include <platform_def.h>
#include <stddef.h>
+#include <platform_def.h>
+
+#include <drivers/auth/auth_mod.h>
#if USE_TBBR_DEFS
-#include <tbbr_oid.h>
+#include <tools_share/tbbr_oid.h>
#else
#include <platform_oid.h>
#endif