mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
- Added reading of DHM context from memory and file
This commit is contained in:
parent
8123e9d8f1
commit
1b57b06751
8 changed files with 201 additions and 2 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue