Gilles Peskine
97c45bb2e0
Merge pull request #10120 from gilles-peskine-arm/test_suite_ssl-fix-ret-20250408
...
Fix uncaught failure conditions in test_suite_ssl
2025-04-23 16:42:20 +00:00
David Horstmann
232da48471
Merge pull request #9421 from mfil/feature/implement_tls_exporter
...
Implement TLS-Exporter
2025-04-17 14:47:13 +00:00
Gilles Peskine
946bf14608
Fix some test helper functions returning 0 on some failures
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2025-04-08 09:48:40 +02:00
Gilles Peskine
55b8bb43e7
Check the status of mbedtls_ssl_set_hostname()
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2025-04-08 09:44:34 +02:00
Manuel Pégourié-Gonnard
ed4a2b4f0a
Merge branch 'development-restricted' into merge-from-restricted
...
* development-restricted:
Add missing credit for set_hostname issue
Add changelog entry for TLS 1.2 Finished fix
TLS1.2: Check for failures in Finished calculation
ssl_session_reset: preserve HOSTNAME_SET flag
Document the need to call mbedtls_ssl_set_hostname
Improve documentation of mbedtls_ssl_set_hostname
Changelog entries for requiring mbedls_ssl_set_hostname() in TLS clients
Add a note about calling mbedtls_ssl_set_hostname to mbedtls_ssl_setup
mbedtls_ssl_set_hostname tests: add tests with CA callback
Call mbedtls_ssl_set_hostname in the generic endpoint setup in unit tests
Require calling mbedtls_ssl_set_hostname() for security
Create error code for mbedtls_ssl_set_hostname not called
Keep track of whether mbedtls_ssl_set_hostname() has been called
Access ssl->hostname through abstractions in certificate verification
mbedtls_ssl_set_hostname tests: baseline
Add a flags field to mbedtls_ssl_context
Automate MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK dependency
Make guards more consistent between X.509-has-certs and SSL-has-certs
Fix Doxygen markup
Make ticket_alpn field private
Conflicts:
programs/ssl/ssl_test_common_source.c
2025-04-01 09:40:47 +02:00
Max Fillinger
ee467aae69
mbedtls_test_ssl_do_handshake_with_endpoints: Zeroize endpoints
...
Signed-off-by: Max Fillinger <max@max-fillinger.net >
2025-03-28 17:08:12 +01:00
Max Fillinger
ea1e777c01
Coding style cleanup
...
Signed-off-by: Max Fillinger <max@max-fillinger.net >
2025-03-28 17:06:48 +01:00
Max Fillinger
8f12e31223
Exportert tests: Free endpoints and options
...
Signed-off-by: Max Fillinger <max@max-fillinger.net >
2025-03-28 17:06:48 +01:00
Max Fillinger
cf007ca8bb
Add more tests for keying material export
...
Signed-off-by: Max Fillinger <maximilian.fillinger@foxcrypto.com >
2025-03-28 17:06:47 +01:00
Manuel Pégourié-Gonnard
e57ea21a1c
Merge pull request #10042 from bjwtaylor/remove-ssl-conf
...
Remove mbedtls_ssl_conf_rng()
2025-03-27 14:05:42 +00:00
Ronald Cron
99226e9b9b
cmake: Generate test_keys.h and test_certs.h in the build tree
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2025-03-26 21:19:28 +01:00
Ben Taylor
47111a1cb1
initial remove of mbedtls_ssl_conf_rng
...
Signed-off-by: Ben Taylor <ben.taylor@linaro.org >
2025-03-26 13:32:10 +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
Manuel Pégourié-Gonnard
6637ef798f
New test function inject_client_content_on_the_wire()
...
Not used for real stuff so far, just getting the tooling in place.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2025-03-14 09:22:09 +01:00
Gilles Peskine
856a370628
Call mbedtls_ssl_set_hostname in the generic endpoint setup in unit tests
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2025-02-24 18:48:49 +01:00
Ronald Cron
3ed75c5b4f
Move psa_test_wrappers.h/c to tf-psa-crypto
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-12-04 14:25:02 +01:00
Waleed Elmelegy
b30233f6c3
Change key param to mbedtls_svc_key_id_t in psa_export_public_key_iop_setup()
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-11-27 16:08:01 +00:00
Janos Follath
f36693822f
Merge pull request #9778 from waleed-elmelegy-arm/add-iop-export-pub-key-headers
...
Add header and documentation for interruptible ECC export public-key
2024-11-21 13:54:29 +00:00
David Horstmann
531adafb0a
Move some test helpers out of Mbed TLS
...
Everything not TLS-related and not ALT-interface-related has been moved
out of tests/src and tests/include and into the framework, except for
the PSA test wrappers.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-11-18 15:50:43 +00:00
Waleed Elmelegy
fad77f1ff4
Add iop export public-key generated test wrappers
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-11-15 17:27:36 +00:00
Paul Elliott
66d7bcbef1
Add key export on successful key agreement
...
More sanity checks on key coming out of key agreement.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-11-15 14:09:03 +00:00
Paul Elliott
2c9d398553
Add new psa_key_agreement() to key exercises
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-11-15 14:09:03 +00:00
Paul Elliott
d118cd21d6
Fix definition of psa_generate_key_iop_complete()
...
Incorrect usage of psa_key_id_t breaks ability to regenerate psa_sim
headers properly, should have been mbedtls_svc_key_id_t in the first
place, so replace with that.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-11-14 19:07:58 +00:00
Waleed Elmelegy
a2891a9ac9
Add PSA interuptable key agreement APIs
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-11-06 16:03:46 +00:00
Manuel Pégourié-Gonnard
69868299a8
Merge pull request #9430 from davidhorstmann-arm/align-development-3.6-test-helpers
...
Align development test helpers with 3.6
2024-10-30 09:09:34 +00:00
David Horstmann
f8d13d8fad
Merge pull request #9721 from paul-elliott-arm/fix_new_coverity_issues
...
Fix new coverity issues
2024-10-25 16:43:37 +00:00
Paul Elliott
a698976fdb
Add const specifiers to pacify armclang
...
Functions designed for local scope only should be const
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-10-24 14:58:22 +01:00
David Horstmann
08ccf6ac9b
Tidy up header guards
...
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-10-23 16:55:53 +01:00
David Horstmann
34d79ce73d
Only guard with CRYPTO_CLIENT when version >= 4
...
In 4.x the semantics of MBEDTLS_PSA_CRYPTO_C and
MBEDTLS_PSA_CRYPTO_CLIENT are different compared with 3.6.
Where this is a problem, make guards more version-specific so that we
are guarding with MBEDTLS_PSA_CRYPTO_C for 3.6 and
MBEDTLS_PSA_CRYPTO_CLIENT for 4.x, keeping each branch the same as it
was formerly.
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-10-21 14:06:26 +01:00
David Horstmann
0d8287c062
Align tests/src and include/src with 3.6 version
...
Allow tests/src and include/src to be Mbed TLS version-agnostic by:
* Sometimes accepting both an MBEDTLS_ and a PSA_ config option
* Sometimes using the version number to gate alternatives
Signed-off-by: David Horstmann <david.horstmann@arm.com >
2024-10-21 14:06:03 +01:00
Harry Ramsey
bef54c5003
Remove unnecessary if defined
...
This commit removes unnecessary if defined for multiple files as they
are already guarded.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com >
2024-10-21 12:00:24 +01:00
Harry Ramsey
924dca9d39
Move mbedtls_test_hook_error_add from error.c to helpers.c
...
This commit moves mbedtls_test_hook_error_add from error.c to helpers.c.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com >
2024-10-18 15:16:05 +01:00
Ronald Cron
69c489c25a
Move PSA drivers to drivers/builtin/src
...
They were mistakenly moved to the
core directory from the library
directory.
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2024-10-01 15:32:01 +02:00
David Horstmann
bae154d76c
Merge pull request #9385 from eleuzi01/replace-ecdsa-some
...
Replace MBEDTLS_PK_HAVE_ECDSA* with PSA_WANT counterparts
2024-09-19 13:53:18 +00:00
Tom Cosgrove
b80516816d
Merge pull request #9536 from mpg/rsapub-perf-dev
...
[dev] Rsapub performance fix
2024-09-18 14:20:50 +00: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
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
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
Elena Uziunaite
9fc5be09cb
Replace MBEDTLS_MD_CAN_SHA1 with PSA_WANT_ALG_SHA_1
...
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com >
2024-09-04 18:12:59 +01:00
Waleed Elmelegy
bdf2c98a27
Add psa_key_agreement() API
...
Add psa_key_agreement() API and basic testing.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2024-08-16 14:36:47 +01:00
Paul Elliott
2dc5fa3a19
Add generated files for new iop key generation funcs
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2024-08-15 13:51:05 +01:00
Janos Follath
1176e6f90e
Merge pull request #9410 from paul-elliott-arm/add_docs_iop_key_agreement
...
Add IOP Key agreement Documentation
2024-08-13 13:25:22 +00:00
Gilles Peskine
0858fdca38
Merge pull request #9189 from misch7/fix-v3.6-issues-9186-and-9188
...
Fix build of v3.6 (issues #9186 and #9188 )
2024-08-12 09:34:17 +00:00
Michael Schuster
c1cd26b20f
Revert commit 33af72df in order to not depend on test code
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:59 +01:00
Michael Schuster
0aaa493d84
Add missing include in tests/src/psa_memory_poisoning_wrappers.c to fix missing-prototype error
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:59 +01:00
Michael Schuster
8f606551d7
Fix tests build with MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS enabled
...
In that case mbedtls_psa_platform_get_builtin_key is already declared.
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
Michael Schuster
bd89b791a4
Adjust spacing in tests/suites function sources
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
Michael Schuster
54300d4a4e
Fix missing-prototype errors in tests/suites
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
Michael Schuster
4595e6872d
Move print_buf into mbedtls_test_print_buf helper function in sample programs
...
Reduce code duplication and fix missing-prototype error for print_buf
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00
Michael Schuster
2b87afbd1f
Add missing include in tests/src/asn1_helpers.c
...
Signed-off-by: Michael Schuster <michael@schuster.ms >
2024-08-09 10:29:58 +01:00