Use MBEDTLS_TEST_DEPRECATED only 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 34ffbbf..dd5226c 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -119,8 +119,7 @@
mbedtls_cipher_free( ctx );
mbedtls_cipher_init( ctx );
-#if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) || \
- !defined(MBEDTLS_TEST_DEPRECATED)
+#if !defined(MBEDTLS_USE_PSA_CRYPO) || !defined(MBEDTLS_TEST_DEPRECATED)
(void) use_psa;
(void) tag_len;
#else
@@ -131,8 +130,7 @@
tag_len ) );
}
else
-#endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED ||
- !MBEDTLS_TEST_DEPRECATED */
+#endif /* !MBEDTLS_USE_PSA_CRYPTO || !MBEDTLS_TEST_DEPRECATED */
{
TEST_ASSERT( 0 == mbedtls_cipher_setup( ctx,
mbedtls_cipher_info_from_type( cipher_id ) ) );
@@ -1074,8 +1072,7 @@
memset( output, 0x00, sizeof( output ) );
/* Prepare context */
-#if !defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED) || \
- !defined(MBEDTLS_TEST_DEPRECATED)
+#if !defined(MBEDTLS_USE_PSA_CRYPO) || !defined(MBEDTLS_TEST_DEPRECATED)
(void) use_psa;
#else
if( use_psa == 1 )
@@ -1085,8 +1082,7 @@
mbedtls_cipher_info_from_type( cipher_id ), 0 ) );
}
else
-#endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED ||
- !MBEDTLS_TEST_DEPRECATED*/
+#endif /* !MBEDTLS_USE_PSA_CRYPTO || !MBEDTLS_TEST_DEPRECATED*/
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx,
mbedtls_cipher_info_from_type( cipher_id ) ) );
@@ -1104,9 +1100,9 @@
exit:
mbedtls_cipher_free( &ctx );
-#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_DEPRECATED_REMOVED)
+#if defined(MBEDTLS_USE_PSA_CRYPO) && defined(MBEDTLS_TEST_DEPRECATED)
PSA_DONE( );
-#endif /* !MBEDTLS_USE_PSA_CRYPTO || MBEDTLS_DEPRECATED_REMOVED */
+#endif /* MBEDTLS_USE_PSA_CRYPTO && defined(MBEDTLS_TEST_DEPRECATED */
}
/* END_CASE */