Fix mbedtls_cipher_setup_psa() dependencies in tests
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function
index 2f352c1..99e1d11 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -119,7 +119,7 @@
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 @@
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 @@
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 @@
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 @@
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 */