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

Align tests/src and include/src with 3.6 version

Allow tests/src and include/src to be Mbed TLS version-agnostic by:
* Sometimes accepting both an MBEDTLS_ and a PSA_ config option
* Sometimes using the version number to gate alternatives

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2024-07-26 18:01:04 +01:00
parent 467edcd64a
commit 0d8287c062
11 changed files with 51 additions and 4 deletions

View File

@@ -253,7 +253,9 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string);
* \param key_type Key type
* \param key_bits Key length in number of bits.
*/
#if defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
#if defined(MBEDTLS_AES_ALT) || \
defined(MBEDTLS_AES_SETKEY_ENC_ALT) || \
defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES)
#define MBEDTLS_TEST_HAVE_ALT_AES 1
#else
#define MBEDTLS_TEST_HAVE_ALT_AES 0
@@ -295,7 +297,8 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string);
* \param nonce_length The nonce length in number of bytes.
*/
#if defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
#if defined(MBEDTLS_GCM_ALT) || \
defined(MBEDTLS_PSA_ACCEL_ALG_GCM)
#define MBEDTLS_TEST_HAVE_ACCEL_GCM 1
#else
#define MBEDTLS_TEST_HAVE_ACCEL_GCM 0