mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 14:15:39 +01:00
Allow compilation without MBEDTLS_SELF_TEST enabled
This commit is contained in:
parent
217efbcb4b
commit
70940caeeb
@ -106,8 +106,8 @@ static int run_test_snprintf( void )
|
||||
* self-test. If this fails, we attempt the test anyway, so no error is passed
|
||||
* back.
|
||||
*/
|
||||
#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_ENTROPY_NV_SEED) && \
|
||||
!defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
||||
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_ENTROPY_C) && \
|
||||
defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
||||
static void create_entropy_seed_file( void )
|
||||
{
|
||||
int result;
|
||||
@ -138,7 +138,7 @@ static void create_entropy_seed_file( void )
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
int v, suites_tested = 0, suites_failed = 0;
|
||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_SELF_TEST)
|
||||
unsigned char buf[1000000];
|
||||
#endif
|
||||
void *pointer;
|
||||
@ -396,10 +396,6 @@ int main( int argc, char *argv[] )
|
||||
suites_tested++;
|
||||
#endif
|
||||
|
||||
#else
|
||||
mbedtls_printf( " MBEDTLS_SELF_TEST not defined.\n" );
|
||||
#endif
|
||||
|
||||
if( v != 0 )
|
||||
{
|
||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG)
|
||||
@ -416,6 +412,10 @@ int main( int argc, char *argv[] )
|
||||
suites_tested++;
|
||||
#endif
|
||||
|
||||
#else
|
||||
mbedtls_printf( " MBEDTLS_SELF_TEST not defined.\n" );
|
||||
#endif
|
||||
|
||||
if( v != 0 )
|
||||
{
|
||||
mbedtls_printf( " Executed %d test suites\n\n", suites_tested );
|
||||
|
Loading…
Reference in New Issue
Block a user