Update psa_key_agreement to PSA 1.0

This commit is contained in:
Janos Follath 2019-07-30 12:47:23 +01:00
parent 7374ee6139
commit 7d7ded85fb

View file

@ -3301,11 +3301,12 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
content_len = own_pubkey_ecpoint_len + 1;
/* Compute ECDH shared secret. */
status = psa_key_agreement( &generator,
handshake->ecdh_psa_privkey,
handshake->ecdh_psa_peerkey,
handshake->ecdh_psa_peerkey_len,
PSA_ALG_ECDH( PSA_ALG_SELECT_RAW ) );
status = psa_key_derivation_key_agreement(
&generator,
handshake->ecdh_psa_privkey,
handshake->ecdh_psa_peerkey,
handshake->ecdh_psa_peerkey_len,
PSA_ALG_ECDH( PSA_ALG_SELECT_RAW ) );
if( status != PSA_SUCCESS )
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );