1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Avoid in-out length in dhm_calc_secret()

This commit is contained in:
Manuel Pégourié-Gonnard
2015-06-02 16:17:08 +01:00
parent f79b425226
commit 3335205a21
9 changed files with 20 additions and 28 deletions

View File

@ -2477,10 +2477,9 @@ static int ssl_write_client_key_exchange( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X );
MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX );
ssl->handshake->pmslen = MBEDTLS_PREMASTER_SIZE;
if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx,
ssl->handshake->premaster,
MBEDTLS_PREMASTER_SIZE,
&ssl->handshake->pmslen,
ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 )
{