1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Fix mbedtls_cipher_setup_psa() dependencies in tests

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel
2022-05-12 13:51:51 +02:00
parent fd750d1d9a
commit 61922d1328
4 changed files with 666 additions and 666 deletions

View File

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