Adapt cipher and MD layer with _init() and _free()
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index c6a11de..d38d769 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -1758,6 +1758,8 @@
{
md_context_t ctx;
+ md_init( &ctx );
+
/* Info from md_alg will be used instead */
hashlen = 0;
@@ -1779,7 +1781,7 @@
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 || \