mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 16:15:34 +00:00
ssl_tls: adjust to the new key policy initialization and key allocation
This commit is contained in:
parent
ac5dc3423a
commit
2f76075b78
|
@ -507,8 +507,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
|
||||||
psa_key_handle_t master_slot;
|
psa_key_handle_t master_slot;
|
||||||
psa_crypto_generator_t generator = PSA_CRYPTO_GENERATOR_INIT;
|
psa_crypto_generator_t generator = PSA_CRYPTO_GENERATOR_INIT;
|
||||||
|
|
||||||
if( ( status = psa_allocate_key( PSA_KEY_TYPE_DERIVE,
|
if( ( status = psa_allocate_key( &master_slot ) ) != PSA_SUCCESS )
|
||||||
slen * 8, &master_slot ) ) != PSA_SUCCESS )
|
|
||||||
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
||||||
|
@ -517,7 +516,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
|
||||||
else
|
else
|
||||||
alg = PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256);
|
alg = PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256);
|
||||||
|
|
||||||
psa_key_policy_init( &policy );
|
policy = psa_key_policy_init();
|
||||||
psa_key_policy_set_usage( &policy,
|
psa_key_policy_set_usage( &policy,
|
||||||
PSA_KEY_USAGE_DERIVE,
|
PSA_KEY_USAGE_DERIVE,
|
||||||
alg );
|
alg );
|
||||||
|
|
Loading…
Reference in a new issue