mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-24 06:02:44 +00:00
Make use of mbedtls_dhm_set_group
when generating DHM params
This commit is contained in:
parent
8880e75dcb
commit
ab74056037
@ -2940,10 +2940,11 @@ static int ssl_write_server_key_exchange( mbedtls_ssl_context *ssl )
|
|||||||
* opaque dh_Ys<1..2^16-1>;
|
* opaque dh_Ys<1..2^16-1>;
|
||||||
* } ServerDHParams;
|
* } ServerDHParams;
|
||||||
*/
|
*/
|
||||||
if( ( ret = mbedtls_mpi_copy( &ssl->handshake->dhm_ctx.P, &ssl->conf->dhm_P ) ) != 0 ||
|
if( ( ret = mbedtls_dhm_set_group( &ssl->handshake->dhm_ctx,
|
||||||
( ret = mbedtls_mpi_copy( &ssl->handshake->dhm_ctx.G, &ssl->conf->dhm_G ) ) != 0 )
|
&ssl->conf->dhm_P,
|
||||||
|
&ssl->conf->dhm_G ) ) != 0 )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_mpi_copy", ret );
|
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_dhm_set_group", ret );
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user