Add MBEDTLS_TEST_DEPRECATED dependency

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2022-05-13 15:48:41 +02:00
parent 61922d1328
commit e58ca8bb5e

View file

@ -119,7 +119,8 @@ static int cipher_reset_key( mbedtls_cipher_context_t *ctx, int cipher_id,
mbedtls_cipher_free( ctx ); mbedtls_cipher_free( ctx );
mbedtls_cipher_init( ctx ); mbedtls_cipher_init( ctx );
#if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) #if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) || \
!defined(MBEDTLS_TEST_DEPRECATED)
(void) use_psa; (void) use_psa;
(void) tag_len; (void) tag_len;
#else #else
@ -130,7 +131,8 @@ static int cipher_reset_key( mbedtls_cipher_context_t *ctx, int cipher_id,
tag_len ) ); tag_len ) );
} }
else else
#endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED */ #endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED ||
!MBEDTLS_TEST_DEPRECATED */
{ {
TEST_ASSERT( 0 == mbedtls_cipher_setup( ctx, TEST_ASSERT( 0 == mbedtls_cipher_setup( ctx,
mbedtls_cipher_info_from_type( cipher_id ) ) ); mbedtls_cipher_info_from_type( cipher_id ) ) );
@ -1072,7 +1074,8 @@ void test_vec_crypt( int cipher_id, int operation, data_t *key,
memset( output, 0x00, sizeof( output ) ); memset( output, 0x00, sizeof( output ) );
/* Prepare context */ /* Prepare context */
#if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) #if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) || \
!defined(MBEDTLS_TEST_DEPRECATED)
(void) use_psa; (void) use_psa;
#else #else
if( use_psa == 1 ) if( use_psa == 1 )
@ -1082,7 +1085,8 @@ void test_vec_crypt( int cipher_id, int operation, data_t *key,
mbedtls_cipher_info_from_type( cipher_id ), 0 ) ); mbedtls_cipher_info_from_type( cipher_id ), 0 ) );
} }
else else
#endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED */ #endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED ||
!MBEDTLS_TEST_DEPRECATED*/
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx, TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx,
mbedtls_cipher_info_from_type( cipher_id ) ) ); mbedtls_cipher_info_from_type( cipher_id ) ) );