mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-15 16:35:43 +03:00
Run test_suite_debug without MBEDTLS_SSL_TLS_C
Move the suite's global dependency on MBEDTLS_SSL_TLS_C to the individual test cases. Add an preprocesor guard around string_debug to prevent warning about unused functions. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
@@ -7,7 +7,8 @@ struct buffer_data {
|
|||||||
char *ptr;
|
char *ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
void string_debug(void *data, int level, const char *file, int line, const char *str)
|
#if defined(MBEDTLS_SSL_TLS_C)
|
||||||
|
static void string_debug(void *data, int level, const char *file, int line, const char *str)
|
||||||
{
|
{
|
||||||
struct buffer_data *buffer = (struct buffer_data *) data;
|
struct buffer_data *buffer = (struct buffer_data *) data;
|
||||||
char *p = buffer->ptr;
|
char *p = buffer->ptr;
|
||||||
@@ -42,14 +43,15 @@ void string_debug(void *data, int level, const char *file, int line, const char
|
|||||||
|
|
||||||
buffer->ptr = p;
|
buffer->ptr = p;
|
||||||
}
|
}
|
||||||
|
#endif /* MBEDTLS_SSL_TLS_C */
|
||||||
/* END_HEADER */
|
/* END_HEADER */
|
||||||
|
|
||||||
/* BEGIN_DEPENDENCIES
|
/* BEGIN_DEPENDENCIES
|
||||||
* depends_on:MBEDTLS_DEBUG_C:MBEDTLS_SSL_TLS_C
|
* depends_on:MBEDTLS_DEBUG_C
|
||||||
* END_DEPENDENCIES
|
* END_DEPENDENCIES
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C */
|
||||||
void debug_print_msg_threshold(int threshold, int level, char *file,
|
void debug_print_msg_threshold(int threshold, int level, char *file,
|
||||||
int line, char *result_str)
|
int line, char *result_str)
|
||||||
{
|
{
|
||||||
@@ -80,7 +82,7 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C */
|
||||||
void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
|
void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
|
||||||
char *result_str)
|
char *result_str)
|
||||||
{
|
{
|
||||||
@@ -109,7 +111,7 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C */
|
||||||
void mbedtls_debug_print_buf(char *file, int line, char *text,
|
void mbedtls_debug_print_buf(char *file, int line, char *text,
|
||||||
data_t *data, char *result_str)
|
data_t *data, char *result_str)
|
||||||
{
|
{
|
||||||
@@ -138,7 +140,7 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */
|
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C */
|
||||||
void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
|
void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
|
||||||
char *prefix, char *result_str)
|
char *prefix, char *result_str)
|
||||||
{
|
{
|
||||||
@@ -172,7 +174,7 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_BIGNUM_C */
|
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C:MBEDTLS_BIGNUM_C */
|
||||||
void mbedtls_debug_print_mpi(char *value, char *file, int line,
|
void mbedtls_debug_print_mpi(char *value, char *file, int line,
|
||||||
char *prefix, char *result_str)
|
char *prefix, char *result_str)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user