Adapt cipher and MD layer with _init() and _free()
This commit is contained in:
parent
accaffe2c3
commit
84bbeb58df
13 changed files with 134 additions and 47 deletions
|
@ -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 || \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue