mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
tls: remove useless legacy function
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
@ -3019,24 +3019,24 @@ curve_matching_done:
|
||||
psa_status_t status = PSA_ERROR_GENERIC_ERROR;
|
||||
psa_key_attributes_t key_attributes;
|
||||
mbedtls_ssl_handshake_params *handshake = ssl->handshake;
|
||||
size_t ecdh_bits = 0;
|
||||
uint8_t *p = ssl->out_msg + ssl->out_msglen;
|
||||
const size_t header_size = 4; // curve_type(1), namedcurve(2),
|
||||
// data length(1)
|
||||
const size_t data_length_size = 1;
|
||||
psa_ecc_family_t ec_psa_family = 0;
|
||||
size_t ec_bits = 0;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "Perform PSA-based ECDH computation." ) );
|
||||
|
||||
/* Convert EC group to PSA key type. */
|
||||
handshake->ecdh_psa_type = mbedtls_psa_parse_tls_ecc_group(
|
||||
*curr_tls_id, &ecdh_bits );
|
||||
|
||||
if( handshake->ecdh_psa_type == 0 )
|
||||
/* Convert EC's TLS ID to PSA key type. */
|
||||
if( mbedtls_ssl_get_psa_curve_info_from_tls_id( *curr_tls_id,
|
||||
&ec_psa_family, &ec_bits ) == PSA_ERROR_NOT_SUPPORTED )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "Invalid ecc group parse." ) );
|
||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
||||
}
|
||||
handshake->ecdh_bits = ecdh_bits;
|
||||
handshake->ecdh_psa_type = PSA_KEY_TYPE_ECC_KEY_PAIR( ec_psa_family );
|
||||
handshake->ecdh_bits = ec_bits;
|
||||
|
||||
key_attributes = psa_key_attributes_init();
|
||||
psa_set_key_usage_flags( &key_attributes, PSA_KEY_USAGE_DERIVE );
|
||||
|
Reference in New Issue
Block a user