Prevent a warning in case PSA_VENDOR_ECC_MAX_CURVE_BITS is set to 0

Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
Waleed Elmelegy 2024-11-20 15:08:52 +00:00
parent 44e0f75ca3
commit 39d54e1fb1

View File

@ -8184,7 +8184,7 @@ psa_status_t psa_generate_key_iop_complete(
{ {
#if defined(MBEDTLS_ECP_RESTARTABLE) #if defined(MBEDTLS_ECP_RESTARTABLE)
psa_status_t status; psa_status_t status;
uint8_t key_data[PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)] = { 0 }; uint8_t key_data[PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(PSA_VENDOR_ECC_MAX_CURVE_BITS)+1] = { 0 };
size_t key_len = 0; size_t key_len = 0;
if (operation->id == 0 || operation->error_occurred) { if (operation->id == 0 || operation->error_occurred) {