mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Adapt cipher and MD layer with _init() and _free()
This commit is contained in:
@ -1758,6 +1758,8 @@ static int ssl_parse_server_key_exchange( ssl_context *ssl )
|
||||
{
|
||||
md_context_t ctx;
|
||||
|
||||
md_init( &ctx );
|
||||
|
||||
/* Info from md_alg will be used instead */
|
||||
hashlen = 0;
|
||||
|
||||
@ -1779,7 +1781,7 @@ static int ssl_parse_server_key_exchange( ssl_context *ssl )
|
||||
md_update( &ctx, ssl->handshake->randbytes, 64 );
|
||||
md_update( &ctx, ssl->in_msg + 4, params_len );
|
||||
md_finish( &ctx, hash );
|
||||
md_free_ctx( &ctx );
|
||||
md_free( &ctx );
|
||||
}
|
||||
else
|
||||
#endif /* POLARSSL_SSL_PROTO_TLS1 || POLARSSL_SSL_PROTO_TLS1_1 || \
|
||||
|
Reference in New Issue
Block a user