cleaned up indentation and braket issues in mbedtls_cmac_verify

This commit is contained in:
Brian Murray 2016-05-24 22:46:43 -07:00 committed by Simon Butcher
parent ba426948b2
commit 0b21cdf7bc

View file

@ -355,8 +355,15 @@ int mbedtls_cmac_verify( mbedtls_cmac_context *ctx,
diff |= tag[i] ^ check_tag[i]; diff |= tag[i] ^ check_tag[i];
if( diff != 0 ) if( diff != 0 )
{
ret = MBEDTLS_ERR_CMAC_VERIFY_FAILED; ret = MBEDTLS_ERR_CMAC_VERIFY_FAILED;
goto exit; goto exit;
}
else
{
ret = 0;
goto exit;
}
exit: exit:
mbedtls_free( check_tag ); mbedtls_free( check_tag );
@ -718,6 +725,7 @@ static inline int cmac_test_wth_cipher( int verbose,
mbedtls_printf( "failed\n" ); mbedtls_printf( "failed\n" );
goto exit; goto exit;
} }
if( ( ret = memcmp( tag, &expected_result[i * block_size], block_size ) ) != 0 ) if( ( ret = memcmp( tag, &expected_result[i * block_size], block_size ) ) != 0 )
{ {
if( verbose != 0 ) if( verbose != 0 )
@ -731,6 +739,8 @@ static inline int cmac_test_wth_cipher( int verbose,
mbedtls_printf( "failed\n" ); mbedtls_printf( "failed\n" );
goto exit; goto exit;
} }
if( verbose != 0 )
mbedtls_printf( "passed\n" ); mbedtls_printf( "passed\n" );
} }
exit: exit: