Commit Graph

994 Commits

Author SHA1 Message Date
Ronald Cron
e2b24d3461 Move MBEDTLS_USE_PSA_CRYPTO to "Builtin drivers" section
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-02 13:42:46 +02:00
Ronald Cron
da4522c2b8 Move MBEDTLS_ERROR_C to section "General configuration options"
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-10-02 13:42:34 +02:00
Ronald Cron
eb589f9b99 Rename MBEDTLS_PSA_CRYPTO_(USER_)CONFIG_FILE
Rename MBEDTLS_PSA_CRYPTO_(USER_)CONFIG_FILE to
TF_PSA_CRYPTO_(USER_)CONFIG_FILE as we rename
crypto_config.h to tf_psa_crypto_config.h.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 17:03:54 +02:00
Ronald Cron
89d8a27d00 Rework overview of section changes
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 17:03:09 +02:00
Ronald Cron
be352633ae Re-organize "Mbed TLS modules" and "Module configuration options"
Re-organize "Mbed TLS modules" and "Module configuration options"
into "X.509 feature selection" and "TLS feature selection" for
better alignment with tf_psa_crypto_config.h.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 17:03:07 +02:00
Ronald Cron
b992bc8aa7 Re-order mbedtls_config.h sections
Re-order mbedtls_config.h sections for
the order to be more aligned with the
tf_psa_crypto_config.h one.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 17:00:49 +02:00
Ronald Cron
3c7b3be34e No subsection
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 16:59:39 +02:00
Ronald Cron
2c152fdc4e Add links to section descriptions
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 16:59:33 +02:00
Ronald Cron
294b5e06b1 Improve alphabetic ordering in sections
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-27 16:32:02 +02:00
Ronald Cron
4162c3a24a Fix/Improve wording
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-19 11:05:56 +02:00
Ronald Cron
a5a46d0322 Fix md rendering
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-10 09:40:59 +02:00
Ronald Cron
f50ae4273f Sort macros alphabetically in sections
Do not mix boolean and non boolean options
though.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 17:29:21 +02:00
Ronald Cron
2589ee3952 Move CIPHER, DRBG and TIME options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 16:22:56 +02:00
Ronald Cron
075c742cb0 Add backticks around file names
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 15:43:38 +02:00
Ronald Cron
5e29260544 Rework first sections
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 09:12:10 +02:00
Ronald Cron
a25e9dbdeb Move MBEDTLS_VERSION_* back to mbedtls_config.h
We will add TF-PSA-Crypto specific ones when
we add support for querying version and version
features in TF-PSA-Crypto.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:55:07 +02:00
Ronald Cron
8e1b463e34 Reorder sections
Move "Cryptographic mechanism selection (extended API)"
and "Data format support" just after section
Cryptographic mechanism selection (PSA API)"

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
e5d0f8c906 Move MBEDTLS_*_RETURN config options
Move MBEDTLS_*_RETURN config options
in the same section as
MBEDTLS_CHECK_RETURN_WARNING.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
34a4086901 Move MBEDTLS_NET_C config option
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
717663bcbc Move MBEDTLS_SELF_TEST option
Move MBEDTLS_SELF_TEST option to
the "General and test configuration options"
section as MBEDTLS_VERSION_C.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
42c30e6a6e Move DRBG options
Move DRBG options to the
"Cryptographic mechanism selection (extended API)"
section.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
61391063b6 No config renaming
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
ca99203bc3 Remove module and function _ALT config option
These options have been removed now.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
ad62dce86f Keep legacy crypto config options
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
5c46496dd2 Improve section names
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
4f4a30c2e7 Remove question marks triplets
The associated config options are at the
right place.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:35:34 +02:00
Ronald Cron
a3f3fca492 Remove trailing spaces
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-04 08:33:58 +02:00
Ronald Cron
8793d9cee8 Configuration file split proposal
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-06-06 18:27:31 +02:00
David Horstmann
f6f3bcae43 Update file paths for moved files
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
Bence Szépkúti
e3abb6a148
Merge pull request #9094 from davidhorstmann-arm/move-mbedtls-dev-to-framework
Move `mbedtls_dev` to framework submodule
2024-05-28 15:50:47 +00:00
David Horstmann
cd84bb287b Update references to mbedtls_dev
Change these to point to the new mbedtls_framework module in the
framework submodule.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-13 14:43:29 +01:00
Gilles Peskine
ff3b8211ff Driver-only FFDH is not good enough for DHE support in TLS 1.2
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-04-30 16:20:20 +02:00
Manuel Pégourié-Gonnard
4575d230bf Add a note on hits usefulness
And fix a typo while at it.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-15 10:54:49 +02:00
Manuel Pégourié-Gonnard
432e3b4198 Misc fixes & improvements to driver testing doc
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:41 +02:00
Manuel Pégourié-Gonnard
a47a3c4e13 Rephrase description of the KDF situation
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:41 +02:00
Manuel Pégourié-Gonnard
ae22f04769 Refine paragraphs about incomplete entry points
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:41 +02:00
Manuel Pégourié-Gonnard
0ca2fd0e2b Update libtestdriver1 vs internal
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:40 +02:00
Manuel Pégourié-Gonnard
dde1abd572 Update of opaque asymmetric encrypt/decrypt
https://github.com/Mbed-TLS/mbedtls/pull/8700 merged in the meantime.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:40 +02:00
Manuel Pégourié-Gonnard
6c45361a9c Update for HMAC testing
Been merged in the meantime.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:40 +02:00
Manuel Pégourié-Gonnard
98f8da1b1a Update names of components renamed in the meantime
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:44:40 +02:00
Manuel Pégourié-Gonnard
f2089dab5e Update status of RSA testing
Improved by https://github.com/Mbed-TLS/mbedtls/pull/8616/ - closing
8553.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:01 +02:00
Manuel Pégourié-Gonnard
b18bc80133 Add note about fallback to other entry points
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:01 +02:00
Manuel Pégourié-Gonnard
6a96f42051 Document driver wrapper suite & tested configs
The coverage data for the test drivers was generated using the following
patch:

diff --git a/scripts/lcov.sh b/scripts/lcov.sh
index 9258ba788874..1ef071a65c06 100755
--- a/scripts/lcov.sh
+++ b/scripts/lcov.sh
@@ -63,8 +63,8 @@ if [ $# -gt 0 ] && [ "$1" = "--help" ]; then
 fi

 if in_mbedtls_build_dir; then
-    library_dir='library'
-    title='Mbed TLS'
+    library_dir='tests/src/drivers'
+    title='Mbed TLS test drivers'
 else
     library_dir='core'
     title='TF-PSA-Crypto'
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index 734d8323ca73..f6b17ca5692b 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -4795,14 +4795,17 @@ component_test_psa_crypto_drivers () {
     msg "build: full + test drivers dispatching to builtins"
     scripts/config.py full
     scripts/config.py unset MBEDTLS_PSA_CRYPTO_CONFIG
-    loc_cflags="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST_ALL"
+    loc_cflags="--coverage -DPSA_CRYPTO_DRIVER_TEST_ALL"
     loc_cflags="${loc_cflags} '-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/user-config-for-test.h\"'"
-    loc_cflags="${loc_cflags} -I../tests/include -O2"
+    loc_cflags="${loc_cflags} -I../tests/include -Og -g3"

-    make CC=gcc CFLAGS="${loc_cflags}" LDFLAGS="$ASAN_CFLAGS"
+    make CC=gcc CFLAGS="${loc_cflags}" LDFLAGS="--coverage" -C tests test_suite_psa_crypto_driver_wrappers

     msg "test: full + test drivers dispatching to builtins"
-    make test
+    (cd tests && ./test_suite_psa_crypto_driver_wrappers --verbose)
+    #make test
+
+    scripts/lcov.sh
 }

 component_test_make_shared () {

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:01 +02:00
Manuel Pégourié-Gonnard
b66f9dba11 Document test-driver status per family
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:00 +02:00
Manuel Pégourié-Gonnard
1a827a3422 Start documenting test-driver framework.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-04-12 12:40:00 +02:00
Bence Szépkúti
a376f84eb1
Merge pull request #8937 from valeriosetti/issue8712
Clarify the documentation of mbedtls_pk_setup_opaque
2024-04-04 13:40:57 +00:00
Valerio Setti
ac81e23c33 pk: add check_pair info to mbedtls_pk_setup_opaque() documentation
This also updates use-psa-crypto.md accordingly.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-03-22 14:36:41 +01:00
Minos Galanakis
b70f0fd9a9 Merge branch 'development' into 'development-restricted'
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2024-03-19 22:24:40 +00:00
David Horstmann
3147034457 Mention MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
Explain this option and the way it relates to the copying macros.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-18 15:59:03 +00:00
David Horstmann
0ea8071bda Remove 'Question' line around testing
This question has been resolved, as we know that we can test
transparently.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-03-18 15:51:03 +00:00