32984 Commits

Author SHA1 Message Date
Ben Taylor
3b11f4113f Update tf-psa-crypto to include dependencies.
Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 08:17:38 +00:00
Ben Taylor
440cb2aac2 Remove RNG from x509 and PK
remove the f_rng and p_rng parameter from x509 and PK.

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
2025-03-26 08:17:38 +00:00
David Horstmann
b90a16d589
Merge pull request #10089 from felixc-arm/add-define-in-programs
Define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS in every sample program
2025-03-25 14:24:31 +00:00
Manuel Pégourié-Gonnard
44b3b91556
Merge pull request #9926 from gilles-peskine-arm/error-codes-add-force-low-mbedtls
Do not add error codes
2025-03-25 12:01:55 +00:00
Felix Conway
858b829436 Add define to fuzz/common.c and ssl/ssl_test_lib.c
Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-25 10:06:53 +00:00
Gilles Peskine
61621cbb5d Don't allow psa_xxx() to return MBEDTLS_ERR_XXX
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-24 14:26:39 +00:00
Gilles Peskine
1ffdb18cdb Remove mbedtls_low_level_sterr() and mbedtls_high_level_strerr()
Just removed from the API. We can greatly simplify error.c but that will be
for later.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-24 14:26:39 +00:00
Gilles Peskine
275951292c Update crypto submodule
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-24 14:26:37 +00:00
Gilles Peskine
c8c1a393e0 Changelog entry for error code space unification
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-24 14:13:50 +00:00
Gilles Peskine
a7e14dc9eb Don't expect added error codes
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-03-24 14:13:50 +00:00
Felix Conway
998760ae5d Define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS in every sample program
Add #define MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS to every sample program
before the first include so that mbedtls doesn't break with future
privatization work.

Signed-off-by: Felix Conway <felix.conway@arm.com>
2025-03-24 11:37:33 +00:00
Ronald Cron
0a69f14abc
Merge pull request #10015 from gabor-mezei-arm/9682_remove_RSA_key_exchange
Remove the RSA-decryption key exchange
2025-03-20 21:14:07 +00:00
Gabor Mezei
2c7f38823d
Update framework
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:56:11 +01:00
Gabor Mezei
5ba9b57cbd
Convert test function to a static function
The `resize_buffers` function is no more used as a test
function to convert it to a static function.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:55:35 +01:00
Gabor Mezei
1ac784c5a5
Fix test case migration
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:55:35 +01:00
Gabor Mezei
10018fc82e
Do not remeove macro from design doc
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:55:30 +01:00
Gabor Mezei
9ee58e43e1
Update test dependencies
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:55:30 +01:00
Gabor Mezei
817a1553b9
Add missing newline
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:55:30 +01:00
Gabor Mezei
aeea5e65af
Add changelog entry
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:08 +01:00
Gabor Mezei
47c6277480
Update dependencies
Let the TLS context serialiazation tests to run with other than RSA
ciphersuites.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
58535da8d0
Only check for certificates if it is supported
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
3ead04a12d
Remove/migrate tests for key exchange based on decryption
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
e99e591179
Remove key exchange based on encryption/decryption
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
3ee9a8cf49
Remove TLS-RSA related test cases
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
3c7db0e5a8
Remove MBEDTLS_TLS_RSA_* ciphersuite macros
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
5814e3e566
Remove MBEDTLS_KEY_EXCHANGE_RSA key exchange type
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:07 +01:00
Gabor Mezei
e1e27300a2
Remove MBEDTLS_KEY_EXCHANGE_RSA_ENABLED config option
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2025-03-20 17:53:01 +01:00
Manuel Pégourié-Gonnard
4515d10163
Merge pull request #10039 from bjwtaylor/remove-rng-from-ssl
Remove RNG parameters from public SSL APIs
2025-03-19 11:27:51 +00:00
Gilles Peskine
94b9972124
Merge pull request #10007 from minosgalanakis/task9887_extend_defragmentation_tests
Extend ssl-opt testing for TLS HS defragmentation
2025-03-18 13:09:38 +00:00
Minos Galanakis
625c8fd2d9 ssl-opt: Added 4 and 128 bytes tests to HS defragmentation for server initiated reneg
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-18 10:31:37 +00:00
Minos Galanakis
dfc082e16c ssl-opt: Fixed a minor typo.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2025-03-18 10:25:24 +00:00
Manuel Pégourié-Gonnard
54a6386485
Merge pull request #10052 from mpg/defragment-ext-test-dev
Defragment ext test dev
2025-03-17 11:44:34 +00:00
Manuel Pégourié-Gonnard
d9028228c9
Merge pull request #10063 from davidhorstmann-arm/update-3.0-migration-guide
Update the 3.0 migration guide and fix broken README link
2025-03-14 13:32:28 +00:00
David Horstmann
1d181102fe Reword slightly to be more tentative
We don't guarantee ABI stability, but we do try to maintain it where we
can.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
2025-03-14 10:50:20 +00:00
Manuel Pégourié-Gonnard
6dcfdf1f48 Adapt dependencies to the new world
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
af4606d743 Re-introduce log asserts on positive cases
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
47d0b796af Improve a test assertion
That way if it ever fails it will print the values.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
f4a67cf892 Fix a typo
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
e5ddf36a66 Add test cases for EOF in the middle of fragments
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
ed873f9e59 Adjust logic around log pattern
This is more flexible: the test data gets to decide whether we want to
assert the presence of a pattern or not.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
2285d6122d Add test for length larger than 2^16
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
4f1b38a65e Adapt "large ClientHello" tests to incremental
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
757040c47f Cleanly reject non-HS in-between HS fragments
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
1038b22d74 Reduce the level of logging used in tests
This should avoid running into a bug with printf format specifiers one
windows.

It's also a logical move for actual tests: I used the highest debug
level for discovery, but we don't need that all the time.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
55d9124bb0 Move new tests to their own data file
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
299f94a5d2 Fix dependency issues
Declare the same dependencies as for the previous TLS 1.3 tests, except
for part that varies with the cipher suite (ie AES-GCM).

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
1bed827d22 New test function for large ClientHello
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
6e79ff5bb5 Fix hash dependencies for TLS 1.2 tests
We're not sending a signature_algorithm extension, which means SHA-1.

Caught by depends.py hashes

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
e760d7be41 Fix curve dependencies
In addition to secp256r1 for the handshake, we need secp384r1 as it's
used by the CA certificate.

Caught by depends.py curves

Also, for the "unknown ciphersuite" 1.2 test, use the same key type and
all the same dependencies as of the "good" test above, to avoid having
to determine a second set of correct dependencies just for this one.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00
Manuel Pégourié-Gonnard
ae567ad011 Add missing dependency declaration
This guards the definition of mbedtls_test_ssl_endpoint which we rely
on, so the function won't compile without it.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-03-14 09:22:09 +01:00