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(
452452 uint16_t tls_ecc_grp_reg_id , size_t * bits )
453453{
454454#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 ));
456457#else
457458 const mbedtls_ecp_curve_info * curve_info =
458459 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,
620620 /* prepare the key attributes */
621621#if TARGET_TFM
622622 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 );
626624#else
627625 curve_id = mbedtls_ecc_group_to_psa ( ec -> grp .id , & bits );
628626 key_type = PSA_KEY_TYPE_ECC_KEY_PAIR ( curve_id );
You can’t perform that action at this time.
0 commit comments