From 25fa5a6138d8ec64aecbba2e702cdd538c8dfb42 Mon Sep 17 00:00:00 2001 From: Moran Peker Date: Mon, 25 Feb 2019 13:03:37 +0200 Subject: [PATCH] Remove TEMP_IMPL_ID_DATA and TEMP_IMPL_ID_DATA_SIZE remove from public header into attestation_bootloader_data.c and add const to impl_id_data --- .../attestation_bootloader_data.c | 12 +++++++++++- .../attestation_bootloader_data.h | 12 +----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.c b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.c index d39da9a742..e5aba1c4c0 100755 --- a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.c +++ b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.c @@ -46,4 +46,14 @@ const uint8_t temp_ram_page_data[] = { 0x31, 0x32 }; -uint8_t impl_id_data[TEMP_IMPL_ID_DATA_SIZE] = {TEMP_IMPL_ID_DATA}; +/* Temporary Implementation ID data: mandatory claim represents the original +** implementation signer of the attestation key and identifies the contract +** between the report and verification */ +#define TEMP_IMPL_ID_DATA_SIZE (32u) + +#define TEMP_IMPL_ID_DATA 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, \ + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, \ + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, \ + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF + +const uint8_t impl_id_data[TEMP_IMPL_ID_DATA_SIZE] = {TEMP_IMPL_ID_DATA}; diff --git a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.h b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.h index 88de4cfc9e..6f0c560a29 100755 --- a/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.h +++ b/components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/attestation_bootloader_data.h @@ -34,17 +34,7 @@ extern const uint8_t temp_ram_page_data[]; #define BOOT_TFM_SHARED_DATA_BASE S_RAM_ALIAS_BASE -/* Temporary Implementation ID data: mandatory claim represents the original -** implementation signer of the attestation key and identifies the contract -** between the report and verification */ -#define TEMP_IMPL_ID_DATA_SIZE (32u) - -#define TEMP_IMPL_ID_DATA 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, \ - 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, \ - 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, \ - 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF - -extern uint8_t impl_id_data[]; +extern const uint8_t impl_id_data[]; /* Example verification service URL for initial attestation token - temporary data*/ static const char verification_service_url[] = "www.mbed.com";