Avoid in-out length in dhm_calc_secret()
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index cff8871..6eb190c 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -2477,10 +2477,9 @@
MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: X ", &ssl->handshake->dhm_ctx.X );
MBEDTLS_SSL_DEBUG_MPI( 3, "DHM: GX", &ssl->handshake->dhm_ctx.GX );
- ssl->handshake->pmslen = MBEDTLS_PREMASTER_SIZE;
-
if( ( ret = mbedtls_dhm_calc_secret( &ssl->handshake->dhm_ctx,
ssl->handshake->premaster,
+ MBEDTLS_PREMASTER_SIZE,
&ssl->handshake->pmslen,
ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 )
{