mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-30 06:33:06 +00:00
ssl_helpers.c: unify code format between source file and header file
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
8d60574b7b
commit
d19894fb4d
@ -345,7 +345,8 @@ void mbedtls_test_message_socket_init(
|
|||||||
int mbedtls_test_message_socket_setup(
|
int mbedtls_test_message_socket_setup(
|
||||||
mbedtls_test_ssl_message_queue *queue_input,
|
mbedtls_test_ssl_message_queue *queue_input,
|
||||||
mbedtls_test_ssl_message_queue *queue_output,
|
mbedtls_test_ssl_message_queue *queue_output,
|
||||||
size_t queue_capacity, mbedtls_test_mock_socket *socket,
|
size_t queue_capacity,
|
||||||
|
mbedtls_test_mock_socket *socket,
|
||||||
mbedtls_test_message_socket_context *ctx);
|
mbedtls_test_message_socket_context *ctx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -233,8 +233,8 @@ int mbedtls_test_ssl_buffer_get(mbedtls_test_ssl_buffer *buf,
|
|||||||
return (output_len > INT_MAX) ? INT_MAX : (int) output_len;
|
return (output_len > INT_MAX) ? INT_MAX : (int) output_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbedtls_test_ssl_message_queue_setup(mbedtls_test_ssl_message_queue *queue,
|
int mbedtls_test_ssl_message_queue_setup(
|
||||||
size_t capacity)
|
mbedtls_test_ssl_message_queue *queue, size_t capacity)
|
||||||
{
|
{
|
||||||
queue->messages = (size_t *) mbedtls_calloc(capacity, sizeof(size_t));
|
queue->messages = (size_t *) mbedtls_calloc(capacity, sizeof(size_t));
|
||||||
if (NULL == queue->messages) {
|
if (NULL == queue->messages) {
|
||||||
@ -248,7 +248,8 @@ int mbedtls_test_ssl_message_queue_setup(mbedtls_test_ssl_message_queue *queue,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbedtls_test_ssl_message_queue_free(mbedtls_test_ssl_message_queue *queue)
|
void mbedtls_test_ssl_message_queue_free(
|
||||||
|
mbedtls_test_ssl_message_queue *queue)
|
||||||
{
|
{
|
||||||
if (queue == NULL) {
|
if (queue == NULL) {
|
||||||
return;
|
return;
|
||||||
@ -459,7 +460,8 @@ int mbedtls_test_mock_tcp_recv_nb(void *ctx, unsigned char *buf, size_t len)
|
|||||||
return mbedtls_test_ssl_buffer_get(socket->input, buf, len);
|
return mbedtls_test_ssl_buffer_get(socket->input, buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbedtls_test_message_socket_init(mbedtls_test_message_socket_context *ctx)
|
void mbedtls_test_message_socket_init(
|
||||||
|
mbedtls_test_message_socket_context *ctx)
|
||||||
{
|
{
|
||||||
ctx->queue_input = NULL;
|
ctx->queue_input = NULL;
|
||||||
ctx->queue_output = NULL;
|
ctx->queue_output = NULL;
|
||||||
@ -485,7 +487,8 @@ int mbedtls_test_message_socket_setup(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbedtls_test_message_socket_close(mbedtls_test_message_socket_context *ctx)
|
void mbedtls_test_message_socket_close(
|
||||||
|
mbedtls_test_message_socket_context *ctx)
|
||||||
{
|
{
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user