pk: fix library code for using the new opaque key solution

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2023-04-28 15:26:11 +02:00
parent e00954d0ed
commit 048cd44f77
5 changed files with 14 additions and 20 deletions

View file

@ -2614,8 +2614,7 @@ static int ssl_get_ecdh_params_from_cert(mbedtls_ssl_context *ssl)
return MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH;
}
ssl->handshake->ecdh_psa_privkey =
*((mbedtls_svc_key_id_t *) pk->pk_ctx);
ssl->handshake->ecdh_psa_privkey = pk->opaque_id;
/* Key should not be destroyed in the TLS library */
ssl->handshake->ecdh_psa_privkey_is_external = 1;