tests: psa: Fix guards

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2021-07-06 09:23:06 +02:00
parent 41f275018a
commit fefa4580a5

View file

@ -643,7 +643,7 @@ int mbedtls_test_psa_exported_key_sanity_check(
TEST_EQUAL( exported_length, PSA_BITS_TO_BYTES( bits ) ); TEST_EQUAL( exported_length, PSA_BITS_TO_BYTES( bits ) );
else else
#if defined(MBEDTLS_RSA_C) && defined(MBEDTLS_PK_PARSE_C) #if defined(MBEDTLS_ASN1_PARSE_C)
if( type == PSA_KEY_TYPE_RSA_KEY_PAIR ) if( type == PSA_KEY_TYPE_RSA_KEY_PAIR )
{ {
uint8_t *p = (uint8_t*) exported; uint8_t *p = (uint8_t*) exported;
@ -690,7 +690,7 @@ int mbedtls_test_psa_exported_key_sanity_check(
TEST_ASSERT( exported_length <= PSA_EXPORT_KEY_PAIR_MAX_SIZE ); TEST_ASSERT( exported_length <= PSA_EXPORT_KEY_PAIR_MAX_SIZE );
} }
else else
#endif /* MBEDTLS_RSA_C */ #endif /* MBEDTLS_ASN1_PARSE_C */
#if defined(MBEDTLS_ECP_C) #if defined(MBEDTLS_ECP_C)
if( PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ) ) if( PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ) )
@ -703,7 +703,7 @@ int mbedtls_test_psa_exported_key_sanity_check(
else else
#endif /* MBEDTLS_ECP_C */ #endif /* MBEDTLS_ECP_C */
#if defined(MBEDTLS_RSA_C) #if defined(MBEDTLS_ASN1_PARSE_C)
if( type == PSA_KEY_TYPE_RSA_PUBLIC_KEY ) if( type == PSA_KEY_TYPE_RSA_PUBLIC_KEY )
{ {
uint8_t *p = (uint8_t*) exported; uint8_t *p = (uint8_t*) exported;
@ -731,7 +731,7 @@ int mbedtls_test_psa_exported_key_sanity_check(
PSA_EXPORT_PUBLIC_KEY_MAX_SIZE ); PSA_EXPORT_PUBLIC_KEY_MAX_SIZE );
} }
else else
#endif /* MBEDTLS_RSA_C */ #endif /* MBEDTLS_ASN1_PARSE_C */
#if defined(MBEDTLS_ECP_C) #if defined(MBEDTLS_ECP_C)
if( PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY( type ) ) if( PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY( type ) )