Update psa_generator_read to PSA 1.0

This commit is contained in:
Janos Follath 2019-07-30 12:55:06 +01:00
parent 8dee877e8a
commit 6de99db449
2 changed files with 7 additions and 6 deletions

View File

@ -3315,9 +3315,9 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
ssl->handshake->pmslen =
MBEDTLS_PSA_ECC_KEY_BYTES_OF_CURVE( handshake->ecdh_psa_curve );
status = psa_generator_read( &generator,
ssl->handshake->premaster,
ssl->handshake->pmslen );
status = psa_key_derivation_output_bytes( &generator,
ssl->handshake->premaster,
ssl->handshake->pmslen );
if( status != PSA_SUCCESS )
{
psa_generator_abort( &generator );

View File

@ -668,7 +668,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
}
status = psa_generator_read( &generator, dstbuf, dlen );
status = psa_key_derivation_output_bytes( &generator, dstbuf, dlen );
if( status != PSA_SUCCESS )
{
psa_generator_abort( &generator );
@ -1135,8 +1135,9 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl )
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
}
status = psa_generator_read( &generator, session->master,
master_secret_len );
status = psa_key_derivation_output_bytes( &generator,
session->master,
master_secret_len );
if( status != PSA_SUCCESS )
{
psa_generator_abort( &generator );