Add intermediate variables to increase code readability
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
e9f00445bc
commit
0a60c129de
1 changed files with 5 additions and 3 deletions
|
@ -3173,10 +3173,12 @@ curve_matching_done:
|
||||||
/* Export the public part of the ECDH private key from PSA.
|
/* Export the public part of the ECDH private key from PSA.
|
||||||
* Make one byte space for the length.
|
* Make one byte space for the length.
|
||||||
*/
|
*/
|
||||||
|
unsigned char *own_pubkey = p + data_length_size;
|
||||||
|
size_t own_pubkey_max_len = (size_t)( MBEDTLS_SSL_OUT_CONTENT_LEN
|
||||||
|
- ssl->out_msglen - header_size );
|
||||||
|
|
||||||
status = psa_export_public_key( handshake->ecdh_psa_privkey,
|
status = psa_export_public_key( handshake->ecdh_psa_privkey,
|
||||||
p + data_length_size,
|
own_pubkey, own_pubkey_max_len, &len );
|
||||||
(size_t)( MBEDTLS_SSL_OUT_CONTENT_LEN - ssl->out_msglen - header_size ),
|
|
||||||
&len );
|
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
{
|
{
|
||||||
ret = psa_ssl_status_to_mbedtls( status );
|
ret = psa_ssl_status_to_mbedtls( status );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue