ssl_helpers.c: change prefix and move *certificate_free to static

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
Yanray Wang 2023-03-15 16:05:14 +08:00
parent ead70c8d05
commit f6f71902b7

View File

@ -577,7 +577,7 @@ int mbedtls_test_mock_tcp_recv_msg(void *ctx,
/*
* Deinitializes certificates from endpoint represented by \p ep.
*/
void mbedtls_endpoint_certificate_free(mbedtls_test_ssl_endpoint *ep)
static void test_ssl_endpoint_certificate_free(mbedtls_test_ssl_endpoint *ep)
{
mbedtls_test_ssl_endpoint_certificate *cert = &(ep->cert);
if (cert != NULL) {
@ -729,7 +729,7 @@ int mbedtls_test_ssl_endpoint_certificate_init(mbedtls_test_ssl_endpoint *ep,
exit:
if (ret != 0) {
mbedtls_endpoint_certificate_free(ep);
test_ssl_endpoint_certificate_free(ep);
}
return ret;
@ -845,7 +845,7 @@ void mbedtls_test_ssl_endpoint_free(
mbedtls_test_ssl_endpoint *ep,
mbedtls_test_message_socket_context *context)
{
mbedtls_endpoint_certificate_free(ep);
test_ssl_endpoint_certificate_free(ep);
mbedtls_ssl_free(&(ep->ssl));
mbedtls_ssl_config_free(&(ep->conf));