mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-05 01:23:39 +02:00
library: debug: add PK_WRITE_C guard to mbedtls_debug_print_crt()
In tf-psa-crypto "mbedtls_pk_write_pubkey_psa()" is only available when MBEDTLS_PK_WRITE_C is defined. Therefore we need to add this guard also in mbedtls to "debug_print_pk" (and indirectly to "mbedtls_debug_print_crt") and the corresponding tests using it. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
@@ -178,7 +178,8 @@ void mbedtls_debug_print_buf(const mbedtls_ssl_context *ssl, int level,
|
||||
MBEDTLS_DEBUG_PRINT_BUF_ADD_TEXT);
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO)
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C) && !defined(MBEDTLS_X509_REMOVE_INFO) && \
|
||||
defined(MBEDTLS_PK_WRITE_C)
|
||||
static void debug_print_pk(const mbedtls_ssl_context *ssl, int level,
|
||||
const char *file, int line,
|
||||
const char *text, const mbedtls_pk_context *pk)
|
||||
@@ -250,6 +251,6 @@ void mbedtls_debug_print_crt(const mbedtls_ssl_context *ssl, int level,
|
||||
crt = crt->next;
|
||||
}
|
||||
}
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_X509_REMOVE_INFO */
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_X509_REMOVE_INFO && MBEDTLS_PK_WRITE_C */
|
||||
|
||||
#endif /* MBEDTLS_DEBUG_C */
|
||||
|
||||
@@ -245,7 +245,7 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C:!MBEDTLS_X509_REMOVE_INFO */
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_SSL_TLS_C:MBEDTLS_FS_IO:MBEDTLS_X509_CRT_PARSE_C:!MBEDTLS_X509_REMOVE_INFO:MBEDTLS_PK_WRITE_C */
|
||||
void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
|
||||
char *prefix, char *result_str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user