Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TF-M support to v1.2 #14354

Merged
merged 29 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9e48b78
Add copyright header to hash_wrappers.c
LDong-Arm Jan 20, 2021
e364157
Move hash_wrappers.c to platform subdirectory
LDong-Arm Jan 20, 2021
e0d2c3d
Fix paths in Mbed TLS importer
LDong-Arm Jan 14, 2021
410a1ba
Import mbedtls-2.24 and Mbed PSA Service (non-TFM)
LDong-Arm Jan 14, 2021
b0da9d0
Switch to using `TARGET_TFM_LATEST`
jainvikas8 Dec 22, 2020
260a335
core: Upgrade TFM v1.2 related files
jainvikas8 Jan 15, 2021
ab09a69
Add mbedtls_ecc_group_to_psa() to PSA in TF-M 1.2
jainvikas8 Jan 19, 2021
0ccf4db
Update partition files for `ARM_MUSCA_B1`
jainvikas8 Jan 4, 2021
65e2d45
Update target `ARM_MUSCA_B1` TF-M V1.2 binaries
jainvikas8 Jan 15, 2021
1ac58a8
Update `ARM_MUSCA_B1.py` post binary hook script
jainvikas8 Jan 13, 2021
c0721a9
Update partition files for `ARM_MUSCA_S1`
jainvikas8 Jan 19, 2021
39e226b
Update target `ARM_MUSCA_S1` TF-M V1.2 binaries
jainvikas8 Jan 15, 2021
ef9ed98
Update `ARM_MUSCA_S1.py` post binary hook script
jainvikas8 Jan 15, 2021
8648e4f
Remove: ARM_MUSCA_A1 support
jainvikas8 Jan 18, 2021
308ffe9
Remove old binary signing scripts of TF-M 1.1
jainvikas8 Jan 15, 2021
1a8386a
Refactor: MUSCA targets post binary hook scripts
jainvikas8 Jan 18, 2021
79755ea
Add missing license header and SPDX identifier
jainvikas8 Jan 25, 2021
ac4533a
Exclude Musca signing layouts from compilation
LDong-Arm Jan 28, 2021
88a38c2
Musca S1: include missing `cmsis_nvic.h`
LDong-Arm Feb 3, 2021
12b2c89
PSA/TF-M: support key enrollment algorithm
LDong-Arm Feb 8, 2021
eb0ac59
Deprecation warnings for key enrollment algorithm
LDong-Arm Feb 8, 2021
63523bd
Remove _NS aliases for Musca B1/S1
LDong-Arm Feb 15, 2021
241b062
Update .gitignore for Mbed TLS importer
LDong-Arm Feb 17, 2021
1f4f6dd
Mbed TLS importer: don't import unnecessary files
LDong-Arm Feb 17, 2021
0dd4397
Import mbedtls_ecp_write_key for Cypress Mbed TLS driver
LDong-Arm Jan 25, 2021
2807a01
"Updated directory platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARG…
LDong-Arm Feb 22, 2021
29f7f9f
"Updated secure binaries for [('ARM_MUSCA_B1', 'ARMCLANG')]"
LDong-Arm Feb 22, 2021
6ab4b1c
"Updated secure binaries for [('ARM_MUSCA_S1', 'ARMCLANG')]"
LDong-Arm Feb 22, 2021
62c8379
TARGET_TFM_V1_0: compatibility with Mbed TLS 2.24.0
LDong-Arm Jan 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ test_suite.json
DELIVERY/

# Directory used to clone and build TF-M
features/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_IGNORE/
platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V1_0/TARGET_IGNORE/
platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/TARGET_IGNORE/

# CMake
CMakeCache.txt
Expand Down
2 changes: 1 addition & 1 deletion connectivity/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ target_include_directories(mbed-mbedtls

target_sources(mbed-mbedtls
INTERFACE
platform/src/hash_wrappers.c
platform/src/mbed_trng.cpp
platform/src/platform_alt.cpp
platform/src/shared_rng.cpp
Expand Down Expand Up @@ -46,7 +47,6 @@ target_sources(mbed-mbedtls
source/entropy_poll.c
source/error.c
source/gcm.c
source/hash_wrappers.c
source/havege.c
source/hkdf.c
source/hmac_drbg.c
Expand Down
5 changes: 2 additions & 3 deletions connectivity/mbedtls/include/mbedtls/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
* <https://ieeexplore.ieee.org/servlet/opac?punumber=4375278>.
*/

/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -34,8 +35,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of Mbed TLS (https://tls.mbed.org)
*/

#ifndef MBEDTLS_AES_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/aesni.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* functions; you must not call them directly.
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -21,8 +21,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_AESNI_H
#define MBEDTLS_AESNI_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/arc4.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* security risk. We recommend considering stronger ciphers instead.
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -22,8 +22,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*
*/
#ifndef MBEDTLS_ARC4_H
#define MBEDTLS_ARC4_H
Expand Down
5 changes: 2 additions & 3 deletions connectivity/mbedtls/include/mbedtls/aria.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
* Korean, but see http://210.104.33.10/ARIA/index-e.html in English)
* and also described by the IETF in <em>RFC 5794</em>.
*/
/* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -23,8 +24,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/

#ifndef MBEDTLS_ARIA_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Generic ASN.1 parsing
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_ASN1_H
#define MBEDTLS_ASN1_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/asn1write.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief ASN.1 buffer writing functionality
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_ASN1_WRITE_H
#define MBEDTLS_ASN1_WRITE_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief RFC 1521 base64 encoding/decoding
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_BASE64_H
#define MBEDTLS_BASE64_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/bignum.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Multi-precision integer library
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_BIGNUM_H
#define MBEDTLS_BIGNUM_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/blowfish.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Blowfish block cipher
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_BLOWFISH_H
#define MBEDTLS_BLOWFISH_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/bn_mul.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Multi-precision integer library
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
/*
* Multiply source vector [s] with b, add result
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/camellia.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Camellia block cipher
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_CAMELLIA_H
#define MBEDTLS_CAMELLIA_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/ccm.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* consistent with RFC 3610.
*/
/*
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -42,8 +42,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of Mbed TLS (https://tls.mbed.org)
*/

#ifndef MBEDTLS_CCM_H
Expand Down
4 changes: 1 addition & 3 deletions connectivity/mbedtls/include/mbedtls/certs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Sample certificates and DHM parameters for testing
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_CERTS_H
#define MBEDTLS_CERTS_H
Expand Down
5 changes: 2 additions & 3 deletions connectivity/mbedtls/include/mbedtls/chacha20.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* \author Daniel King <[email protected]>
*/

/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -26,8 +27,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of Mbed TLS (https://tls.mbed.org)
*/

#ifndef MBEDTLS_CHACHA20_H
Expand Down
5 changes: 2 additions & 3 deletions connectivity/mbedtls/include/mbedtls/chachapoly.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* \author Daniel King <[email protected]>
*/

/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -26,8 +27,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of Mbed TLS (https://tls.mbed.org)
*/

#ifndef MBEDTLS_CHACHAPOLY_H
Expand Down
44 changes: 39 additions & 5 deletions connectivity/mbedtls/include/mbedtls/check_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* \brief Consistency checks for configuration options
*/
/*
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand All @@ -18,8 +18,6 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/

/*
Expand Down Expand Up @@ -103,6 +101,17 @@

#if defined(MBEDTLS_ECDSA_C) && \
( !defined(MBEDTLS_ECP_C) || \
!( defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) ) || \
!defined(MBEDTLS_ASN1_PARSE_C) || \
!defined(MBEDTLS_ASN1_WRITE_C) )
#error "MBEDTLS_ECDSA_C defined, but not all prerequisites"
Expand Down Expand Up @@ -156,6 +165,14 @@
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
#endif

#if defined(MBEDTLS_ECP_C) && !( \
defined(MBEDTLS_ECP_ALT) || \
defined(MBEDTLS_CTR_DRBG_C) || \
defined(MBEDTLS_HMAC_DRBG_C) || \
defined(MBEDTLS_ECP_NO_INTERNAL_RNG))
#error "MBEDTLS_ECP_C requires a DRBG module unless MBEDTLS_ECP_NO_INTERNAL_RNG is defined or an alternative implementation is used"
#endif

#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
#endif
Expand All @@ -178,6 +195,16 @@
#error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
#endif

#if defined(__has_feature)
#if __has_feature(memory_sanitizer)
#define MBEDTLS_HAS_MEMSAN
#endif
#endif
#if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN) && !defined(MBEDTLS_HAS_MEMSAN)
#error "MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN requires building with MemorySanitizer"
#endif
#undef MBEDTLS_HAS_MEMSAN

#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \
( !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) )
#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites"
Expand Down Expand Up @@ -238,12 +265,14 @@
#endif

#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) )
( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_ECDSA_C) || \
!defined(MBEDTLS_X509_CRT_PARSE_C) )
#error "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
#endif

#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_X509_CRT_PARSE_C) )
( !defined(MBEDTLS_ECDH_C) || !defined(MBEDTLS_RSA_C) || \
!defined(MBEDTLS_X509_CRT_PARSE_C) )
#error "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
#endif

Expand Down Expand Up @@ -614,6 +643,11 @@
#error "MBEDTLS_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
#endif

#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL) && ( !defined(MBEDTLS_HKDF_C) && \
!defined(MBEDTLS_SHA256_C) && !defined(MBEDTLS_SHA512_C) )
#error "MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL defined, but not all prerequisites"
#endif

#if (defined(MBEDTLS_SSL_PROTO_SSL3) || defined(MBEDTLS_SSL_PROTO_TLS1) || \
defined(MBEDTLS_SSL_PROTO_TLS1_1) || defined(MBEDTLS_SSL_PROTO_TLS1_2)) && \
!(defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) || \
Expand Down
Loading