mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Modify own_pubkey_max_len calculation
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
@ -3166,8 +3166,9 @@ curve_matching_done:
|
|||||||
* Make one byte space for the length.
|
* Make one byte space for the length.
|
||||||
*/
|
*/
|
||||||
unsigned char *own_pubkey = p + data_length_size;
|
unsigned char *own_pubkey = p + data_length_size;
|
||||||
|
|
||||||
size_t own_pubkey_max_len = (size_t)( MBEDTLS_SSL_OUT_CONTENT_LEN
|
size_t own_pubkey_max_len = (size_t)( MBEDTLS_SSL_OUT_CONTENT_LEN
|
||||||
- ssl->out_msglen - header_size );
|
- ( own_pubkey - ssl->out_msg ) );
|
||||||
|
|
||||||
status = psa_export_public_key( handshake->ecdh_psa_privkey,
|
status = psa_export_public_key( handshake->ecdh_psa_privkey,
|
||||||
own_pubkey, own_pubkey_max_len,
|
own_pubkey, own_pubkey_max_len,
|
||||||
|
Reference in New Issue
Block a user