Move DTLS context into the endpoint structure

This is a step towards making mbedtls_test_ssl_endpoint_init() and
mbedtls_test_ssl_endpoint_free() more self-contained.

No behavior change.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2025-05-28 20:23:22 +02:00
parent 9b993681fd
commit 29969593e4
2 changed files with 24 additions and 19 deletions
+5
View File
@@ -194,6 +194,11 @@ typedef struct mbedtls_test_ssl_endpoint {
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
mbedtls_test_mock_socket socket;
/* Objects only used by DTLS.
* They should be guarded by MBEDTLS_SSL_PROTO_DTLS, but
* currently aren't because some code accesses them without guards. */
mbedtls_test_message_socket_context dtls_context;
#if defined(MBEDTLS_TIMING_C)
mbedtls_timing_delay_context timer;
#endif