Skip to content

Commit 4cf090f

Browse files
committed
Fix preprocessor logic for standalone TF-PSA-Crypto
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
1 parent cc7d29a commit 4cf090f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/include/test/psa_crypto_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string);
360360

361361
#endif /* MBEDTLS_PSA_CRYPTO_CLIENT || MBEDTLS_PSA_CRYPTO_C */
362362

363-
#if defined(MBED_TLS_VERSION_MAJOR) && MBEDTLS_VERSION_MAJOR >= 4
363+
#if defined(TF_PSA_CRYPTO_VERSION_MAJOR) || MBEDTLS_VERSION_MAJOR >= 4
364364
/* Legacy PSA_INIT() / PSA_DONE() variants from 3.6 */
365365
#define USE_PSA_INIT() PSA_INIT()
366366
#define USE_PSA_DONE() PSA_DONE()

tests/src/psa_exercise_key.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ psa_status_t mbedtls_test_psa_raw_key_agreement_with_self(
703703
uint8_t output[1024];
704704
size_t output_length;
705705

706-
#if defined(MBEDTLS_VERSION_MAJOR) && MBEDTLS_VERSION_MAJOR >= 4
706+
#if defined(TF_PSA_CRYPTO_VERSION_MAJOR) || MBEDTLS_VERSION_MAJOR >= 4
707707
uint8_t *exported = NULL;
708708
size_t exported_size = 0;
709709
size_t exported_length = 0;
@@ -757,7 +757,7 @@ psa_status_t mbedtls_test_psa_raw_key_agreement_with_self(
757757
PSA_RAW_KEY_AGREEMENT_OUTPUT_MAX_SIZE);
758758
}
759759

760-
#if defined(MBEDTLS_VERSION_MAJOR) && MBEDTLS_VERSION_MAJOR >= 4
760+
#if defined(TF_PSA_CRYPTO_VERSION_MAJOR) || MBEDTLS_VERSION_MAJOR >= 4
761761
psa_status_t raw_status = status;
762762

763763
psa_set_key_type(&shared_secret_attributes, PSA_KEY_TYPE_DERIVE);
@@ -871,7 +871,7 @@ psa_status_t mbedtls_test_psa_raw_key_agreement_with_self(
871871
*/
872872
psa_reset_key_attributes(&attributes);
873873

874-
#if defined(MBEDTLS_VERSION_MAJOR) && MBEDTLS_VERSION_MAJOR >= 4
874+
#if defined(TF_PSA_CRYPTO_VERSION_MAJOR) || MBEDTLS_VERSION_MAJOR >= 4
875875
psa_reset_key_attributes(&export_attributes);
876876

877877
/* Make sure to reset and free derived key attributes and slot. */

0 commit comments

Comments
 (0)