From 9ae01344757b5cdfc35c1476f31590c7c8b2dabc Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 11 Sep 2002 16:53:00 +0000 Subject: Corrected bug in gnutls_dh_params_set(). Corrected bug in session resuming code of server side. --- NEWS | 2 ++ lib/gnutls_db.c | 1 + lib/gnutls_dh_primes.c | 8 ++++---- lib/gnutls_rsa_export.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 75913f8d29..4b97eb7d4e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ Version 0.5.7 - Some fixes in the memory allocation functions (realloc). - Improved the string functions used in XML certificate generation. - Removed dependency on libgdbm. +- Corrected bug in gnutls_dh_params_set() +- Corrected bug in session resuming code in server side. Version 0.5.6 (6/09/2002) - Corrected bugs in SRP implementation, which prevented gnutls diff --git a/lib/gnutls_db.c b/lib/gnutls_db.c index 770d935e82..3b7290da27 100644 --- a/lib/gnutls_db.c +++ b/lib/gnutls_db.c @@ -225,6 +225,7 @@ int ret; ret = gnutls_session_set_data( session, data.data, data.size); if (ret < 0) { gnutls_assert(); + return ret; } /* Note: Data is not allocated with gnutls_malloc diff --git a/lib/gnutls_dh_primes.c b/lib/gnutls_dh_primes.c index 292639b231..c9a84b5a69 100644 --- a/lib/gnutls_dh_primes.c +++ b/lib/gnutls_dh_primes.c @@ -582,15 +582,15 @@ int gnutls_dh_params_set(gnutls_dh_params dh_params, gnutls_datum prime, sprime->_prime = tmp_prime; sprime->_generator = tmp_g; -/* sprime->_prime = _gnutls_mpi_copy(tmp_prime); - sprime->_generator = _gnutls_mpi_copy(tmp_g); -*/ + sprime->generator.data = NULL; + sprime->prime.data = NULL; + if (gnutls_set_datum(&sprime->prime, prime.data, prime.size) < 0) { gnutls_assert(); return GNUTLS_E_MEMORY_ERROR; } if (gnutls_set_datum - (&sprime->prime, generator.data, generator.size) < 0) { + (&sprime->generator, generator.data, generator.size) < 0) { gnutls_assert(); return GNUTLS_E_MEMORY_ERROR; } diff --git a/lib/gnutls_rsa_export.c b/lib/gnutls_rsa_export.c index cd79fcc1d5..48336c1eba 100644 --- a/lib/gnutls_rsa_export.c +++ b/lib/gnutls_rsa_export.c @@ -150,7 +150,7 @@ int _gnutls_rsa_generate_params(GNUTLS_MPI* resarr, int bits) } -/* returns a negative value if the bits is not supported +/* returns a negative value if the bits size is not supported */ static int check_bits(int bits) { -- cgit v1.2.1