Add CMake option for explicitly link library to trusted_storage #186

Merged
moshe-shahar merged 2 commits from psa-storage-and-cmake-fix into development 2019-07-24 09:52:21 -05:00
moshe-shahar commented 2019-07-21 02:04:31 -05:00 (Migrated from github.com)

CMake option name: LINK_WITH_TRUSTED_STORAGE
Default value is ON since the default of mbedtls for MBEDTLS_PSA_ITS_FILE_C is using ITS.

This PR is based on https://github.com/ARMmbed/mbed-crypto/pull/180 with the addition of one commit. Please merge after it.

The new option assumes trusted_storage library exist and force mbedcrypto library to link with it. Any application/test uses emulated ITS (by defining MBEDTLS_PSA_ITS_FILE_C) should set this option to OFF.

CMake option name: LINK_WITH_TRUSTED_STORAGE Default value is `ON` since the default of mbedtls for `MBEDTLS_PSA_ITS_FILE_C` [is using ITS](https://github.com/ARMmbed/mbedtls/blob/ff645d9838f4797c726562d90c0a9ae5207ea86f/include/mbedtls/config.h#L2872). This PR is based on https://github.com/ARMmbed/mbed-crypto/pull/180 with the addition of one commit. Please merge after it. The new option assumes `trusted_storage` library exist and force `mbedcrypto` library to link with it. Any application/test uses emulated ITS (by defining `MBEDTLS_PSA_ITS_FILE_C`) should set this option to `OFF`.
moshe-shahar commented 2019-07-21 02:08:30 -05:00 (Migrated from github.com)

@Patater, please review.

@simonqhughes, FYI.

@Patater, please review. @simonqhughes, FYI.
Patater (Migrated from github.com) requested changes 2019-07-24 05:37:26 -05:00
@ -1,6 +1,7 @@
option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON)
Patater (Migrated from github.com) commented 2019-07-24 05:36:43 -05:00

This should default to OFF, as most of our Linux systems don't have a trusted_storage library available. On Mbed Linux, this can be changed to ON.

This should default to OFF, as most of our Linux systems don't have a trusted_storage library available. On Mbed Linux, this can be changed to ON.
Patater (Migrated from github.com) commented 2019-07-24 05:37:21 -05:00

Do we need to link with trusted_storage in Makefile builds as well? Seems odd to only add the possibility to link with trusted_stored for CMake.

Do we need to link with trusted_storage in Makefile builds as well? Seems odd to only add the possibility to link with trusted_stored for CMake.
Patater (Migrated from github.com) reviewed 2019-07-24 05:45:35 -05:00
Patater (Migrated from github.com) commented 2019-07-24 05:45:35 -05:00
I've filed https://github.com/ARMmbed/mbed-crypto/issues/188 for this
moshe-shahar (Migrated from github.com) reviewed 2019-07-24 06:23:08 -05:00
@ -1,6 +1,7 @@
option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON)
moshe-shahar (Migrated from github.com) commented 2019-07-24 06:23:07 -05:00

done

done
Patater (Migrated from github.com) approved these changes 2019-07-24 07:08:49 -05:00
Patater (Migrated from github.com) left a comment

LGTM

LGTM
simonqhughes (Migrated from github.com) approved these changes 2019-07-24 09:51:03 -05:00
simonqhughes (Migrated from github.com) left a comment

lgtm

lgtm
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-ARMmbed/mbed-crypto!186
No description provided.