Fix intermittent test failure

Ecp key data length should not be measured by mbedtls_mpi_size(), as
this does not count leading zeros, which are still part of the key. This
resulted intermittently in the code attempting to import a wrongly sized
key as the first byte was all zero.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c b/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c
index 498072a..57131d3 100644
--- a/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c
+++ b/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c
@@ -634,7 +634,7 @@
 
     operation->num_ops = 1;
 
-    *key_len = mbedtls_mpi_size(&operation->ecp.d);
+    *key_len = operation->ecp.d.n * sizeof(mbedtls_mpi_uint);
     if (*key_len > key_output_size) {
         return PSA_ERROR_BUFFER_TOO_SMALL;
     }