31967 Commits

Author SHA1 Message Date
Gilles Peskine
9404169146 Use CONFIGS_ENABLED instead of repeatedly calling query_compile_time_config
It's faster and more readable.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-13 09:48:01 +02:00
Gilles Peskine
56ee69de5b Fix "Renegotiation: openssl server, client-initiated" with OpenSSL 3
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-13 09:48:01 +02:00
Elena Uziunaite
ffce45c19f Add missing ALG_SHA_1
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-12 14:58:52 +01:00
Ronald Cron
a45ba05e35
Merge pull request #9549 from ronald-cron-arm/adapt-components
Adapt some all.sh components to MBEDTLS_PSA_CRYPTO_CONFIG always on
2024-09-12 12:00:39 +00:00
Paul Elliott
2f620f3127
Merge pull request #9561 from gilles-peskine-arm/cmake-underscore_D
Fix typo that caused cpp_dummy_build not to be built with CMake
2024-09-12 11:40:46 +00:00
Ronald Cron
5f71537fdd
Merge pull request #9552 from ronald-cron-arm/project-and-branches-detection
Projects and 3.6 branch detections
2024-09-12 11:06:13 +00:00
Paul Elliott
8ea8b30941
Merge pull request #8988 from billatarm/add-pc-files
tests: add a test for pkg-config files
2024-09-11 21:14:46 +00:00
Bill Roberts
10ff4174f4
tests: add a test for pkg-config files
Add a test that does some basic validation of the pkg-config files.

Example run:
./tests/scripts/all.sh test_cmake_as_package
<snip>
******************************************************************
* test_cmake_as_package: build: cmake 'as-package' build
* Wed Sep 11 16:17:41 UTC 2024
******************************************************************
cmake .
make
Built against Mbed TLS 3.6.0
testing package config file: mbedtls ... passed
testing package config file: mbedx509 ... passed
testing package config file: mbedcrypto ... passed
make clean

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
2024-09-11 09:19:42 -07:00
Gilles Peskine
236e05d758 Fix typo that caused cpp_dummy_build not to be built with CMake
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 17:51:45 +02:00
Gilles Peskine
9fa8dc44d6 Fix shared library builds
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 16:07:09 +02:00
Ronald Cron
4153ebb55d Fix comments
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-11 15:32:48 +02:00
Ronald Cron
25012e5f81 Update framework to the merge of #45
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-11 14:55:06 +02:00
Gilles Peskine
71a53b5cc0 Fix test suites invoked in the wrong directory
Running test suites from another directory only works when the auto-chdir
code in host_test.function is enabled, which is platform-dependent and
configuration-dependent.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 13:21:50 +02:00
Gilles Peskine
282abb507d Create seedfile in the tf-psa-crypto subproject
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 12:56:57 +02:00
Gilles Peskine
24515f9b71 Revert "Adapt basic-build-test.sh"
This reverts commit 0866936d26436401cb5976b9c2a93ceb1110e1cf.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 12:56:47 +02:00
Gilles Peskine
ef2dd74a86 Run test suites with a single call to run-test-suites.pl
Before this commit, `make test` stopped after running the TLS tests if there
was a failure.

Have `run-test-suites.pl` take care of looking in all the directories, so
that the last line of output from `make test` is an accurate report of all
the test suites, not just the test suites from the last run of
`run-test-suites.pl`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-11 12:50:05 +02:00
Ronald Cron
22eb209c3a Update framework
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-11 09:41:31 +02:00
David Horstmann
7ba04a298c Bump version to 4.0.0
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-09-10 10:43:14 +02:00
Ronald Cron
932878137a Use scripts/project_name.txt in Python scripts
Use scripts/project_name.txt in Python scripts
to detect between Mbed TLS and TF-PSA-Crypto
project.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-10 10:43:02 +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
Elena Uziunaite
9c6476461f Remove definitions of MBEDTLS_PK_CAN/HAVE_ECDSA*
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
b430eeea85 Bring back some dependencies
To make CI happier

Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
91d8386a42 Enable USE_PSA_CRYPTO
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
96867b6bf4 Address review comments: remove dependencies
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
8d8620bf18 Address review comments: add PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
bed21b55a6 Replace MBEDTLS_PK_CAN_ECDSA_VERIFY with PSA_HAVE_ALG_ECDSA_VERIFY
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:10 +01:00
Elena Uziunaite
39c7d5dc4b Replace MBEDTLS_PK_CAN_ECDSA_SIGN with PSA_HAVE_ALG_ECDSA_SIGN
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:18:08 +01:00
Elena Uziunaite
4fd105c3fa Introduce PSA_HAVE_ALG_ECDSA_SIGN and PSA_HAVE_ALG_ECDSA_VERIFY
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:17:36 +01:00
Elena Uziunaite
a6950b8ce7 Replace MBEDTLS_PK_CAN_ECDSA_SOME with PSA_HAVE_ALG_SOME_ECDSA
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-09 11:17:36 +01:00
Ronald Cron
ada6ce58ea Update framework to latest
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 10:47:39 +02:00
Ronald Cron
e7f289e5e9 Use PSA crypto config in test_sha3_variations
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 07:47:08 +02:00
Ronald Cron
6604047204 all.sh: Keep only "test_block_cipher_no_decrypt_aesni" with PSA config
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 07:47:08 +02:00
Ronald Cron
54d1eecd58 all.sh: Enable MBEDTLS_PSA_CRYPTO_CONFIG in build_aes_variations
In preparation of MBEDTLS_PSA_CRYPTO_CONFIG
being always on, enable MBEDTLS_PSA_CRYPTO_CONFIG
in build_aes_variations.

While enabling MBEDTLS_PSA_CRYPTO_CONFIG, disable
some PSA_WANT_ so that the configuration
remain the same for the modified component.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 07:47:08 +02:00
Ronald Cron
a9511bc57f all.sh: Enable MBEDTLS_PSA_CRYPTO_CONFIG in tls13 components
In preparation of MBEDTLS_PSA_CRYPTO_CONFIG
being always on, enable MBEDTLS_PSA_CRYPTO_CONFIG
in some TLS 1.3 all.sh test components.

While enabling MBEDTLS_PSA_CRYPTO_CONFIG, disable
some PSA_WANT_ so that the configurations
remain the same for the modified components.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-09-09 07:47:08 +02:00
Ronald Cron
8c95999b38
Merge pull request #9544 from eleuzi01/replace-224k1
Replace MBEDTLS_ECP_HAVE_SECP224K1 with PSA_WANT_ECC_SECP_K1_224
2024-09-06 15:15:35 +00:00
Gilles Peskine
1ad1954e8f
Merge pull request #9304 from sezrab/analyze_driver_vs_reference_header_correction
Fix inconsistent ordering of driver vs reference in analyze_outcomes
2024-09-05 16:36:06 +00:00
David Horstmann
924c1a3235
Merge pull request #9540 from eleuzi01/replace-sha1
Replace MBEDTLS_MD_CAN_SHA1 with PSA_WANT_ALG_SHA_1
2024-09-05 15:41:21 +00:00
Elena Uziunaite
63cb13e494 Replace MBEDTLS_ECP_HAVE_SECP224K1 with PSA_WANT_ECC_SECP_K1_224
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
2024-09-05 12:43:14 +01:00
Manuel Pégourié-Gonnard
b70ef8690a Move new files to their correct location
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 12:55:12 +02:00
Manuel Pégourié-Gonnard
0c4a115442 Remove codepath testing where it's redundant
Constant-time testing with Memsan or Valgrind is much more robust, as it
doesn't require cooperation from the code under test.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 12:55:11 +02:00
Manuel Pégourié-Gonnard
49645f6490 Misc improvements to comments
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:45 +02:00
Manuel Pégourié-Gonnard
3106013e17 Fix code style (for real this time, hopefully)
For some reason I didn't think about other files in the previous commit.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:44 +02:00
Manuel Pégourié-Gonnard
464bf78396 Fix guards on #include
The rest of the file uses mbedtls_mpi_uint_t unconditionally, so its
definition should also be #include'd unconditionally.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:43 +02:00
Manuel Pégourié-Gonnard
e91d924821 Fix code style
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2024-09-05 10:47:42 +02:00
Janos Follath
21445c580f Prepare codepath tests for early termination
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-09-05 10:47:42 +02:00
Janos Follath
44eca95ace Fix incorrect test result
Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-09-05 10:47:41 +02:00
Janos Follath
514e62c833 Move bignum code path testing out of the library
Without this, it's not at all obvious that turning on MBEDTLS_TEST_HOOKS
doesn't change the functional behavior of the code.

Signed-off-by: Janos Follath <janos.follath@arm.com>
2024-09-05 10:47:40 +02:00