psa: Configure Mbed TLS to use PSA as needed

Configure Mbed TLS to automatically enable PSA as needed. When Mbed OS
is configured to use PSA, configure Mbed TLS to use PSA. This prevents
leaking of the "how to make Mbed TLS use PSA" knowledge up into
targets.json, and thus makes porting simpler. There is now one place
where "how to make TLS use PSA" exists rather than repeated throughout
targets.json for each target that can't inherit from PSA_Target.
pull/12955/head
Jaeden Amero 2020-06-12 17:52:13 +01:00
parent b38c5ed8e3
commit 4961d4a52d
2 changed files with 9 additions and 20 deletions

View File

@ -83,6 +83,11 @@ prepend_code
"#error \"No entropy source was found at build time, so TLS \" \\\\\n" \
" \"functionality is not available\"\n" \
"#endif\n" \
"\n" \
"#if defined(FEATURE_EXPERIMENTAL_API) && defined(FEATURE_PSA)\n" \
" #define MBEDTLS_PSA_HAS_ITS_IO\n" \
" #define MBEDTLS_USE_PSA_CRYPTO\n" \
"#endif\n" \
"\n"
# not supported on mbed OS, nor used by mbed Client

View File

@ -93,10 +93,6 @@
"features": [
"PSA"
],
"macros_add": [
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
],
"public": false,
"config": {}
},
@ -6273,10 +6269,6 @@
"features_add": [
"PSA"
],
"macros_add": [
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
],
"extra_labels_add": [
"MBED_PSA_SRV"
],
@ -6621,9 +6613,7 @@
],
"macros_add": [
"CY8C624ABZI_D44",
"CYBSP_WIFI_CAPABLE",
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
"CYBSP_WIFI_CAPABLE"
],
"device_name": "CY8C624ABZI-D44",
"mbed_ram_start": "0x08002000",
@ -6752,9 +6742,7 @@
"macros_add": [
"CYB0644ABZI_S2D44",
"CYBSP_WIFI_CAPABLE",
"TFM_MULTI_CORE_MULTI_CLIENT_CALL=1",
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
"TFM_MULTI_CORE_MULTI_CLIENT_CALL=1"
],
"detect_code": [
"190A"
@ -6809,9 +6797,7 @@
"macros_add": [
"CYB0644ABZI_S2D44",
"CYBSP_WIFI_CAPABLE",
"TFM_MULTI_CORE_MULTI_CLIENT_CALL=1",
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
"TFM_MULTI_CORE_MULTI_CLIENT_CALL=1"
],
"detect_code": [
"190A"
@ -7179,9 +7165,7 @@
"1702"
],
"macros_add": [
"GD32F450",
"MBEDTLS_PSA_HAS_ITS_IO",
"MBEDTLS_USE_PSA_CRYPTO"
"GD32F450"
],
"bootloader_supported": true,
"release_versions": [