Gilles Peskine fb2ce055a3 SSL tests: make client authentication more uniform, defaulting on
There was a discrepancy between how `mbedtls_test_ssl_endpoint_init()` and
`mbedtls_test_ssl_perform_handshake()` handled client authentication:
`mbedtls_test_ssl_endpoint_init()` defaulted to
`MBEDTLS_SSL_VERIFY_REQUIRED` on both sides, whereas
`mbedtls_test_ssl_perform_handshake()` obeyed `options->srv_auth_mode` which
defaulted to no verification of the client certificate.

Make this more uniform. Now `mbedtls_test_ssl_endpoint_init()` obeys
`options->srv_auth_mode` on servers (still forcing verification on clients,
which is the library default anyway). Also, `options->srv_auth_mode` is now
enabled by default. Thus:

* Tests that call `mbedtls_test_ssl_perform_handshake()` now perform client
  certificate verification, unless they disable it explicitly.
* Tests that call `mbedtls_test_ssl_endpoint_init()` on a server are
  unchanged. (They would change if they were setting
  `options->srv_auth_mode` explicitly, which previously was ignored, but
  no test function did this.)

This means that a few test functions now perform client certificate
verification whereas they previously don't. This is harmless except in
`handshake_ciphersuite_select`, where one test case
`Handshake, select ECDH-RSA-WITH-AES-256-CBC-SHA384, opaque` fails with
client authentication because the test code doesn't deal with the weirdness
of static ECDH correctly with respect to client authentication. So keep
the previous behavior in `handshake_ciphersuite_select`, by explicitly
turning off client authentication.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2025-05-28 21:36:28 +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 SSL tests: make client authentication more uniform, defaulting on 2025-05-28 21:36:28 +02:00
suites SSL tests: make client authentication more uniform, defaulting on 2025-05-28 21:36:28 +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