Fix printed output of some selftests

This commit is contained in:
Manuel Pégourié-Gonnard 2015-08-07 10:46:54 +02:00
parent cdee2d9148
commit d1004f02e6
2 changed files with 9 additions and 6 deletions

View file

@ -408,10 +408,7 @@ int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const ch
/* Dummy checkup routine */
int mbedtls_hmac_drbg_self_test( int verbose )
{
if( verbose != 0 )
mbedtls_printf( "\n" );
(void) verbose;
return( 0 );
}
#else

View file

@ -1642,9 +1642,12 @@ int mbedtls_rsa_self_test( int verbose )
return( 1 );
}
if( verbose != 0 )
mbedtls_printf( "passed\n" );
#if defined(MBEDTLS_SHA1_C)
if( verbose != 0 )
mbedtls_printf( "passed\n PKCS#1 data sign : " );
mbedtls_printf( "PKCS#1 data sign : " );
mbedtls_sha1( rsa_plaintext, PT_LEN, sha1sum );
@ -1670,9 +1673,12 @@ int mbedtls_rsa_self_test( int verbose )
}
if( verbose != 0 )
mbedtls_printf( "passed\n\n" );
mbedtls_printf( "passed\n" );
#endif /* MBEDTLS_SHA1_C */
if( verbose != 0 )
mbedtls_printf( "\n" );
cleanup:
mbedtls_rsa_free( &rsa );
#else /* MBEDTLS_PKCS1_V15 */