mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Adjust verbose self-test output to match other ciphers.
This commit is contained in:
parent
8fe4701abe
commit
dedf4a3e7b
3 changed files with 52 additions and 7 deletions
|
|
@ -490,6 +490,11 @@ int mbedtls_poly1305_self_test( int verbose )
|
|||
|
||||
for ( i = 0U; i < 2U; i++ )
|
||||
{
|
||||
if ( verbose != 0 )
|
||||
{
|
||||
mbedtls_printf( " Poly1305 test %zi ", i );
|
||||
}
|
||||
|
||||
result = mbedtls_poly1305_mac( test_keys[i],
|
||||
test_data_len[i],
|
||||
test_data[i],
|
||||
|
|
@ -498,7 +503,7 @@ int mbedtls_poly1305_self_test( int verbose )
|
|||
{
|
||||
if ( verbose != 0 )
|
||||
{
|
||||
mbedtls_printf( "Poly1305 test %zi error code: %i\n", i, result );
|
||||
mbedtls_printf( "error code: %i\n", result );
|
||||
}
|
||||
|
||||
return( -1 );
|
||||
|
|
@ -508,11 +513,21 @@ int mbedtls_poly1305_self_test( int verbose )
|
|||
{
|
||||
if ( verbose != 0 )
|
||||
{
|
||||
mbedtls_printf( "Poly1305 test %zi failed\n", i );
|
||||
mbedtls_printf( "failed\n" );
|
||||
}
|
||||
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
if ( verbose != 0 )
|
||||
{
|
||||
mbedtls_printf( "passed\n" );
|
||||
}
|
||||
}
|
||||
|
||||
if( verbose != 0 )
|
||||
{
|
||||
mbedtls_printf( "\n" );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue