@@ -366,16 +366,15 @@ static inline int mbedtls_psa_err_translate_pk( psa_status_t status )
366
366
* https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
367
367
* into a PSA ECC group identifier. */
368
368
#if defined(MBEDTLS_ECP_C )
369
- static inline psa_ecc_curve_t mbedtls_psa_parse_tls_ecc_group (
370
- uint16_t tls_ecc_grp_reg_id )
369
+ static inline psa_key_type_t mbedtls_psa_parse_tls_ecc_group (
370
+ uint16_t tls_ecc_grp_reg_id , size_t * bits )
371
371
{
372
- size_t bits ;
373
372
const mbedtls_ecp_curve_info * curve_info =
374
373
mbedtls_ecp_curve_info_from_tls_id ( tls_ecc_grp_reg_id );
375
374
if ( curve_info == NULL )
376
375
return ( 0 );
377
- else
378
- return ( mbedtls_ecc_group_to_psa ( curve_info -> grp_id , & bits ) );
376
+ return ( PSA_KEY_TYPE_ECC_KEY_PAIR (
377
+ mbedtls_ecc_group_to_psa ( curve_info -> grp_id , bits ) ) );
379
378
}
380
379
#endif /* MBEDTLS_ECP_C */
381
380
@@ -404,15 +403,12 @@ static inline int mbedtls_psa_tls_psa_ec_to_ecpoint( unsigned char *src,
404
403
* exchanges) and converts it into a format that the PSA key
405
404
* agreement API understands.
406
405
*/
407
- static inline int mbedtls_psa_tls_ecpoint_to_psa_ec ( psa_ecc_curve_t curve ,
408
- unsigned char const * src ,
406
+ static inline int mbedtls_psa_tls_ecpoint_to_psa_ec ( unsigned char const * src ,
409
407
size_t srclen ,
410
408
unsigned char * dst ,
411
409
size_t dstlen ,
412
410
size_t * olen )
413
411
{
414
- ((void ) curve );
415
-
416
412
if ( srclen > dstlen )
417
413
return ( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL );
418
414
0 commit comments