pk: wrap curve_id before passing it to PSA

Add a helper function in PSA utils
diff --git a/library/pk.c b/library/pk.c
index 8f649f9..c0ed542 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -572,7 +572,8 @@
         return( ret );
 
     curve_id = mbedtls_ecp_curve_info_from_grp_id( ec->grp.id )->tls_id;
-    key_type = PSA_KEY_TYPE_ECC_KEYPAIR(curve_id);
+    key_type = PSA_KEY_TYPE_ECC_KEYPAIR(
+    		                     mbedtls_psa_parse_tls_ecc_group ( curve_id ) );
 
     /* allocate a key slot */
     if( PSA_SUCCESS != psa_allocate_key( key_type, d_len * 8, &key ) )