File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,8 @@ static inline psa_key_type_t mbedtls_psa_parse_tls_ecc_group(
452
452
uint16_t tls_ecc_grp_reg_id , size_t * bits )
453
453
{
454
454
#if TARGET_TFM
455
- return ( (psa_ecc_curve_t ) tls_ecc_grp_reg_id );
455
+ * bits = PSA_ECC_CURVE_BITS ( tls_ecc_grp_reg_id );
456
+ return ( PSA_KEY_TYPE_ECC_KEY_PAIR ( tls_ecc_grp_reg_id ));
456
457
#else
457
458
const mbedtls_ecp_curve_info * curve_info =
458
459
mbedtls_ecp_curve_info_from_tls_id ( tls_ecc_grp_reg_id );
Original file line number Diff line number Diff line change @@ -620,9 +620,7 @@ int mbedtls_pk_wrap_as_opaque( mbedtls_pk_context *pk,
620
620
/* prepare the key attributes */
621
621
#if TARGET_TFM
622
622
curve_id = mbedtls_ecp_curve_info_from_grp_id ( ec -> grp .id )-> tls_id ;
623
- key_type = PSA_KEY_TYPE_ECC_KEY_PAIR (
624
- mbedtls_psa_parse_tls_ecc_group ( curve_id ,
625
- & bits ) );
623
+ key_type = mbedtls_psa_parse_tls_ecc_group ( curve_id , & bits );
626
624
#else
627
625
curve_id = mbedtls_ecc_group_to_psa ( ec -> grp .id , & bits );
628
626
key_type = PSA_KEY_TYPE_ECC_KEY_PAIR ( curve_id );
You can’t perform that action at this time.
0 commit comments