From 24b1768f53d8814ff2f35b305968f3dbce2f1712 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 20 Jun 2019 15:33:16 +0100 Subject: [PATCH] crypto: Enable use on non-PSA targets Move PSA Crypto implementation files outside of a TARGET_PSA folder, enabling use of PSA Crypto APIs on more Mbed OS targets. --- features/mbedtls/mbed-crypto/importer/Makefile | 4 ++-- .../COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h | 0 .../{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto.c | 0 .../{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h | 0 .../{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c | 0 .../COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h | 0 .../{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_its_file.c | 0 .../{TARGET_PSA => }/COMPONENT_SPE/crypto_struct_spe.h | 0 .../mbed-crypto/platform/{TARGET_PSA => }/mbed_lib.json | 0 14 files changed, 2 insertions(+), 2 deletions(-) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto.c (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_PSA_SRV_IMPL/psa_its_file.c (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/COMPONENT_SPE/crypto_struct_spe.h (100%) rename features/mbedtls/mbed-crypto/platform/{TARGET_PSA => }/mbed_lib.json (100%) diff --git a/features/mbedtls/mbed-crypto/importer/Makefile b/features/mbedtls/mbed-crypto/importer/Makefile index 29821dced6..8d5ea91ccf 100644 --- a/features/mbedtls/mbed-crypto/importer/Makefile +++ b/features/mbedtls/mbed-crypto/importer/Makefile @@ -48,10 +48,10 @@ TLS_SRC := \ # (NSPE). Documentation for each folder as follows: # COMPONENT_PSA_SRV_IMPL - Include secure service implementation code. For # example PSA Crypto or PSA Secure Time implementations -TARGET_SRV_IMPL:=$(TARGET_PREFIX)/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL +TARGET_SRV_IMPL:=$(TARGET_PREFIX)/platform/COMPONENT_PSA_SRV_IMPL # COMPONENT_SPE - Include code that compiles ONLY to the SPE image and never # compiles to the NSPE image -TARGET_SPE:=$(TARGET_PREFIX)/platform/TARGET_PSA/COMPONENT_SPE +TARGET_SPE:=$(TARGET_PREFIX)/platform/COMPONENT_SPE # COMPONENT_NSPE - Include code that compiles ONLY to the NSPE image and never # compiles to the SPE image TARGET_NSPE:=$(TARGET_SRV_IMPL)/COMPONENT_NSPE diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/COMPONENT_NSPE/crypto_struct.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto.c b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto.c similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto.c rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto.c diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_core.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_invasive.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_its.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_service_integration.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.c diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_slot_management.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.c diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_its_file.c b/features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_its_file.c similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_its_file.c rename to features/mbedtls/mbed-crypto/platform/COMPONENT_PSA_SRV_IMPL/psa_its_file.c diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_SPE/crypto_struct_spe.h b/features/mbedtls/mbed-crypto/platform/COMPONENT_SPE/crypto_struct_spe.h similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_SPE/crypto_struct_spe.h rename to features/mbedtls/mbed-crypto/platform/COMPONENT_SPE/crypto_struct_spe.h diff --git a/features/mbedtls/mbed-crypto/platform/TARGET_PSA/mbed_lib.json b/features/mbedtls/mbed-crypto/platform/mbed_lib.json similarity index 100% rename from features/mbedtls/mbed-crypto/platform/TARGET_PSA/mbed_lib.json rename to features/mbedtls/mbed-crypto/platform/mbed_lib.json