mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
- Added reading of DHM context from memory and file
This commit is contained in:
@ -1806,6 +1806,25 @@ int ssl_set_dh_param( ssl_context *ssl, const char *dhm_P, const char *dhm_G )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
int ssl_set_dh_param_ctx( ssl_context *ssl, dhm_context *dhm_ctx )
|
||||
{
|
||||
int ret;
|
||||
|
||||
if( ( ret = mpi_copy(&ssl->dhm_ctx.P, &dhm_ctx->P) ) != 0 )
|
||||
{
|
||||
SSL_DEBUG_RET( 1, "mpi_copy", ret );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = mpi_copy(&ssl->dhm_ctx.G, &dhm_ctx->G) ) != 0 )
|
||||
{
|
||||
SSL_DEBUG_RET( 1, "mpi_copy", ret );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
int ssl_set_hostname( ssl_context *ssl, const char *hostname )
|
||||
{
|
||||
if( hostname == NULL )
|
||||
|
Reference in New Issue
Block a user