aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRaef Coles <raef.coles@arm.com>2020-10-13 16:52:52 +0100
committerSummer Qin <summer.qin@arm.com>2020-10-30 14:38:10 +0800
commite82831bb618340cec19234468b20ea2a5fdc157b (patch)
tree1c48637fcdef60fc3be0376914b2c133f8eb8edc /lib
parent0a9ca8c73077cd69640183eae558d2bc207d2c41 (diff)
downloadtrusted-firmware-m-e82831bb618340cec19234468b20ea2a5fdc157b.tar.gz
Build: add compat for mbedtls patch upstreaming
Add build options for compatibility with patches being upstreamed to mbedtls. Update header paths in CC312 lib. This keeps compatibility with current patches. Change-Id: I09791019ff6825ec74af95e84a2b27e42dfd20f8 Signed-off-by: Raef Coles <raef.coles@arm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_cc_sha512_t.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_ccm_internal.h4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/srp_driver.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_mont/cc_ec_mont.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_sign.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_verify.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/kdf/cc_kdf.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/ec_edw.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rnd_dma/cc_rnd_common.c6
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/cmac_alt.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/ecp_common.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/rsa_alt.c6
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c8
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/mbedtls_cc_util_asset_prov.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_crypto_driver.c4
-rw-r--r--lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/mbedtls_cc_sha512_t.h4
-rw-r--r--lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc_rsa_types.h4
17 files changed, 38 insertions, 38 deletions
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_cc_sha512_t.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_cc_sha512_t.c
index bf835bb91..66585ce6c 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_cc_sha512_t.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_cc_sha512_t.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,7 +8,7 @@
#include "cc_pal_abort.h"
#include "mbedtls_cc_sha512_t.h"
-#include "sha512.h"
+#include "mbedtls/sha512.h"
#include "cc_pal_mem.h"
#if defined(MBEDTLS_SHA512_C)
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_ccm_internal.h b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_ccm_internal.h
index e15950c46..5687df961 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_ccm_internal.h
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/mbedtls_ccm_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -12,7 +12,7 @@ extern "C"
{
#endif
-#include "ccm.h"
+#include "mbedtls/ccm.h"
int mbedtls_ccm_get_security_level(uint8_t sizeOfT, uint8_t *pSecurityLevel);
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/srp_driver.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/srp_driver.c
index 3cbfaa276..70194d5ef 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/srp_driver.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/srp_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,7 +13,7 @@
#include "hash_driver.h"
#include "mbedtls_cc_srp_error.h"
#include "cc_general_defs.h"
-#include "md.h"
+#include "mbedtls/md.h"
#include "cc_bitops.h"
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_mont/cc_ec_mont.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_mont/cc_ec_mont.c
index e7d8cf465..5f8c7399a 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_mont/cc_ec_mont.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_mont/cc_ec_mont.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -15,7 +15,7 @@
#include "ec_mont_local.h"
#include "ec_mont.h"
#include "cc_general_defs.h"
-#include "md.h"
+#include "mbedtls/md.h"
// RL Debug
#include "pki_dbg.h"
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_sign.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_sign.c
index 2ef8c8f29..69c324938 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_sign.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_sign.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -22,7 +22,7 @@
#include "ec_wrst.h"
#ifdef USE_MBEDTLS_CRYPTOCELL
#include "cc_general_defs.h"
-#include "md.h"
+#include "mbedtls/md.h"
#endif
/************************ Defines *****************************************/
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_verify.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_verify.c
index e95ea4155..d6a56ef0d 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_verify.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/ec_wrst/cc_ecdsa_verify.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,7 +17,7 @@
#include "ec_wrst.h"
#ifdef USE_MBEDTLS_CRYPTOCELL
#include "cc_general_defs.h"
-#include "md.h"
+#include "mbedtls/md.h"
#endif
/************************ Defines *****************************************/
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/kdf/cc_kdf.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/kdf/cc_kdf.c
index 901f31baf..7f233f76d 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/kdf/cc_kdf.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/kdf/cc_kdf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,7 +13,7 @@
#include "cc_fips_defs.h"
#include "cc_general_defs.h"
#ifdef USE_MBEDTLS_CRYPTOCELL
-#include "md.h"
+#include "mbedtls/md.h"
#else
#include "cc_hash.h"
#endif
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/ec_edw.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/ec_edw.c
index fb27325c4..baa4c113f 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/ec_edw.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/ec_edw.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -30,7 +30,7 @@
#include "pki_dbg.h"
#include "cc_int_general_defs.h"
#include "cc_general_defs.h"
-#include "md.h"
+#include "mbedtls/md.h"
/* global data definitions */
extern CC_PalMutex CCAsymCryptoMutex;
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rnd_dma/cc_rnd_common.c b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rnd_dma/cc_rnd_common.c
index 7bdd81157..792b7f723 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rnd_dma/cc_rnd_common.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rnd_dma/cc_rnd_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -23,8 +23,8 @@
#include "cc_fips_defs.h"
#include "cc_util_pm.h"
#ifdef CC_IOT
-#include "ctr_drbg.h"
-#include "entropy.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/entropy.h"
#endif
/* CC RND module version compliant to NIST 800-90 standard. Based on CTR DRBG Block Cipher (AES) */
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/cmac_alt.c b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/cmac_alt.c
index 9c15b9bca..7e7895076 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/cmac_alt.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/cmac_alt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -50,7 +50,7 @@
#include "cc_aes_error.h"
#include "mbedtls_common.h"
#include "mbedtls/cmac.h"
-#include "memory_buffer_alloc.h"
+#include "mbedtls/memory_buffer_alloc.h"
/**
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/ecp_common.c b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/ecp_common.c
index c64b9c374..5aaf69d8e 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/ecp_common.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/ecp_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,7 +8,7 @@
#include "cc_pal_log.h"
#include "cc_ecpki_error.h"
#include "mbedtls_cc_ec_mont_edw_error.h"
-#include "ecp.h"
+#include "mbedtls/ecp.h"
#include "ecp_common.h"
#include "cc_bitops.h"
diff --git a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/rsa_alt.c b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/rsa_alt.c
index ee6bc5eed..b48c57a57 100644
--- a/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/rsa_alt.c
+++ b/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/rsa_alt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,7 +17,7 @@
#include "mbedtls/rsa_internal.h"
#include "mbedtls/oid.h"
#include "mbedtls_common.h"
-#include "bignum.h"
+#include "mbedtls/bignum.h"
#include <string.h>
@@ -62,7 +62,7 @@
#include "pki.h"
#include "rsa.h"
-#include "ctr_drbg.h"
+#include "mbedtls/ctr_drbg.h"
#include "pka.h"
#include "cc_pal_abort.h"
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
index 0a97ce444..7fc7ee107 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/cc_lib.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -25,9 +25,9 @@
#include "dx_id_registers.h"
#include "cc_util_pm.h"
#include "dx_nvm.h"
-#include "ctr_drbg.h"
-#include "entropy.h"
-#include "threading.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/entropy.h"
+#include "mbedtls/threading.h"
#include "mbedtls_cc_mng_int.h"
#include "mbedtls_cc_mng.h"
#include "cc_rnd_common.h"
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/mbedtls_cc_util_asset_prov.c b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/mbedtls_cc_util_asset_prov.c
index 37f886300..01b28e7a2 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/mbedtls_cc_util_asset_prov.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_lib/mbedtls_cc_util_asset_prov.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -15,7 +15,7 @@
#include "mbedtls_cc_util_defs.h"
#include "cc_util_error.h"
#include "cc_aes_defs.h"
-#include "ccm.h"
+#include "mbedtls/ccm.h"
#include "aes_driver.h"
#include "driver_defs.h"
#include "cc_util_cmac.h"
diff --git a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_crypto_driver.c b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_crypto_driver.c
index 123c21688..3e296878f 100644
--- a/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_crypto_driver.c
+++ b/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/prod_crypto_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -21,7 +21,7 @@
#include "driver_defs.h"
#include "cc_production_asset.h"
#include "cc_aes_defs.h"
-#include "ccm.h"
+#include "mbedtls/ccm.h"
/**
* This function is used to perform AES operation.
diff --git a/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/mbedtls_cc_sha512_t.h b/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/mbedtls_cc_sha512_t.h
index 64ccaf869..c999e4d59 100644
--- a/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/mbedtls_cc_sha512_t.h
+++ b/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/mbedtls_cc_sha512_t.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -19,7 +19,7 @@
#ifndef _MBEDTLS_CC_SHA512_T_H
#define _MBEDTLS_CC_SHA512_T_H
-#include <sha512.h>
+#include <mbedtls/sha512.h>
/*!
@brief This function initializes the SHA-512_t context.
diff --git a/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc_rsa_types.h b/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc_rsa_types.h
index f40c0a8f8..20c79030e 100644
--- a/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc_rsa_types.h
+++ b/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc_rsa_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2001-2020, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,7 +17,7 @@
#include "ccsw_rsa_shared_types.h"
#endif
#ifdef USE_MBEDTLS_CRYPTOCELL
-#include "md.h"
+#include "mbedtls/md.h"
#else
#include "cc_hash.h"
#endif