diff --git a/ChangeLog b/ChangeLog index 461fc6e3e..388aea16f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -102,6 +102,8 @@ Bugfix freeing an RSA context and several MPI's without proper initialization beforehand. * Fix error message in programs/pkey/gen_key.c. Found and fixed by Chris Xue. + * Fix programs/pkey/dh_server.c so that it actually works with dh_client.c. + Found and fixed by Martijn de Milliano. Changes * Extend cert_write example program by options to set the CRT version diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index a8ee8fd3d..4038c360d 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -248,6 +248,7 @@ int main( void ) memset( buf, 0, sizeof( buf ) ); + n = dhm.len; if( ( ret = mbedtls_net_recv( &client_fd, buf, n ) ) != (int) n ) { mbedtls_printf( " failed\n ! mbedtls_net_recv returned %d\n\n", ret );