Gilles Peskine 27586d83f0 Move more endpoint configuration into the setup function
Applying SSL configuration settings recorded in the
`mbedtls_test_handshake_test_options` structure to an
`mbedtls_test_ssl_endpoint` object was split between
`mbedtls_test_ssl_endpoint_init()` and `mbedtls_test_ssl_perform_handshake()`.
This was surprising, and made it harder to use
`mbedtls_test_ssl_endpoint_init()` for custom behavior. It also meant some
code duplication in `mbedtls_test_ssl_perform_handshake()`.

Move most configuration setup from `mbedtls_test_ssl_perform_handshake()` to
`mbedtls_test_ssl_endpoint_init()`. This changes the behavior in two ways:

* `mbedtls_test_ssl_endpoint_init()` now takes some options into account
  that it previously ignored. This is ok because we don't set these options
  in any of the existing tests.
* When calling `mbedtls_test_ssl_perform_handshake()`, some SSL configuration
  settings are now set (calls to `mbedtls_ssl_conf_xxx()`) before the call
  to `mbedtls_ssl_setup()` instead of after. This should be ok since it is
  forbidden to change the configuration after `mbedtls_ssl_setup()`,
  although the previous test code was getting away with it. This commit does
  not move all configuration before `mbedtls_ssl_setup()`, that would be out
  of scope of the current series of patches.

Thus there are some internal behavior changes, but they should not affect
any relevant aspect of the tests' behavior.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-28 21:36:26 +02:00
..
.jenkins
configs [development] Remove code relating to MBEDTLS_PSA_INJECT_ENTROPY 2025-03-28 09:01:05 +01:00
git-scripts Header updates 2023-11-03 12:21:36 +00:00
include Separate test function to perform an SSL connection 2025-05-28 20:23:22 +02:00
opt-testcases Switch to generated handshake tests 2025-03-03 16:13:19 +01:00
psa-client-server psasim: add timeout while waiting for psa_server to start 2025-04-29 11:01:46 +02:00
scripts Merge pull request #10090 from valeriosetti/issue9618-development 2025-05-06 22:35:03 +02:00
src Move more endpoint configuration into the setup function 2025-05-28 21:36:26 +02:00
suites Remove unused parameters to endpoint init/free 2025-05-28 20:23:22 +02:00
.gitignore cmake: Generate test_keys.h and test_certs.h in the build tree 2025-03-26 21:19:28 +01:00
CMakeLists.txt cmake: Generate test_keys.h and test_certs.h in the build tree 2025-03-26 21:19:28 +01:00
compat-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
compat.sh Remove TLS-RSA related test cases 2025-03-20 17:53:07 +01:00
context-info.sh Fix test and formatting in ssl_context_info 2025-04-29 22:02:24 +02:00
Descriptions.txt
make-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
Makefile Move script and update shebang to fix CI 2025-04-09 09:51:13 +01:00
ssl-opt.sh Merge pull request #9421 from mfil/feature/implement_tls_exporter 2025-04-17 14:47:13 +00:00