Refactor set_ciphersuites to work on the endpoint structure

Link the ciphersuite list that's passed to mbedtls_ssl_conf_ciphersuites(),
and needs to survive in memory as long as the configuration object is live,
in the endpoint structure. This way it doesn't have to be a local variable
in mbedtls_test_ssl_do_handshake_with_endpoints().

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2025-05-28 20:23:22 +02:00
parent 0677e02b78
commit 2744a43977
2 changed files with 28 additions and 22 deletions
+1
View File
@@ -199,6 +199,7 @@ typedef struct mbedtls_test_ssl_endpoint {
#endif
/* Objects owned by the endpoint */
int *ciphersuites;
mbedtls_x509_crt *ca_chain;
mbedtls_x509_crt *cert;
mbedtls_pk_context *pkey;