1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Fix after PR comments

1. Don't set IV onECB
2. Fix style issues
3. reduce number of tests
This commit is contained in:
Ron Eldor
2017-09-25 18:22:32 +03:00
committed by Simon Butcher
parent 7b01244b99
commit 4e64e0b922
5 changed files with 36 additions and 474 deletions

View File

@ -120,8 +120,8 @@ void cipher_special_behaviours( )
TEST_ASSERT( mbedtls_cipher_set_iv( &ctx, iv, 0 )
== MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
mbedtls_cipher_free( &ctx );
cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB );
mbedtls_cipher_free( &ctx );
cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB );
TEST_ASSERT( NULL != cipher_info );
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, cipher_info ) );
@ -730,7 +730,7 @@ void test_vec_crypt( int cipher_id, int operation, char *hex_key,
if( MBEDTLS_MODE_CBC == ctx.cipher_info->mode )
TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, MBEDTLS_PADDING_NONE ) );
iv_len = unhexify( iv, hex_iv );
iv_len = unhexify( iv, hex_iv );
TEST_ASSERT( finish_result == mbedtls_cipher_crypt( &ctx, iv_len ? iv : NULL,
iv_len, input, inputlen,