This reverts commit 939ce9d0d5.
Build mbedtls_test library of objects to link
with TLS and x509 test suites and programs
with mbedtls framework not TF-PSA-Crypto
one (when it will be there).
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
These must include from both the framework and the main repository since
the test helpers straddle the two locations.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto build system
into the Mbed TLS one is completed.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Restrict the definition of memcheck/lcov targets
to the case where Mbed TLS/TF-PSA-Crypto is the
main project. To avoid conflict between the
targets when the integration of the TF-PSA-Crypto
build system into the Mbed TLS one is completed.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
target_compile_options() does not set
link options as setting CMAKE_C_FLAGS
does. Thus set link options with
set_target_properties(). target_link_options()
is not available in CMake 3.5 used in the CI.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
The UNSAFE_BUILD option was introduced for
the builds with NULL entropy
(option MBEDTLS_TEST_NULL_ENTROPY) but this
configuration option does not exist
anymore.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Use MBEDTLS/TF_PSA_CRYTPO_AS_SUBPROJECT
instead of using the test employed to set
MBEDTLS/TF_PSA_CRYTPO_AS_SUBPROJECT value.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit improves the error messages informing users that have
downloaded Github archives to instead download a release archive. This
is due to Github not supporting submodules within archives and no
trivial way for users to use git to download them.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
Since the bug affecting the performance only affects GCC versions
before 7.0, use -O2 flag instead of -O3 for them and keep the
better optimization for newer compilers.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Old GCC versions hit a performance problem with test_suite_pkwrite
"Private keey write check EC" tests when building with Asan+UBSan
and -O3: those tests take more than 100x time than normal, with
test_suite_pkwrite taking >3h on the CI. Observed with GCC 5.4 on
Ubuntu 16.04 x86_64 and GCC 6.5 on Ubuntu 18.04 x86_64.
GCC 7.5 and above on Ubuntu 18.04 appear fine.
To avoid the performance problem, use -O2 instead of -O3 in then "Asan"
build type with GCC. It doesn't slow down much even with modern compiler
versions.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
Move library options to the top CMakeLists.txt.
That way:
- we will be able to set the TF-PSA-Crypto
library options according to the Mbed TLS ones.
- we can define the crypto library target names
in the top CMakeLists.txt and not in the library
one that is dedicated to the TLS and x509
libraries now.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
`tests/opt-testcases/tls13-compat.sh` is supposed to be automatically
generated by `tests/scripts/generate_tls13_compat_tests.py`. So far, the
output has been updated by running the script manually and committing the
output. Switch to using our framework for generated files.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
In public headers, we want to avoid things that are not standard C++,
including features that GCC and Clang support as extensions, such as
flexible array members. So compile with `-pedantic`.
Non-regression for https://github.com/Mbed-TLS/mbedtls/issues/9020.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>