]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_srp_verifier() returns data allocated with gnutls_malloc()
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 20 Jun 2011 23:02:20 +0000 (01:02 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 20 Jun 2011 23:02:20 +0000 (01:02 +0200)
for consistency.

NEWS
lib/gnutls_srp.c
lib/gnutls_srp.h

diff --git a/NEWS b/NEWS
index c37c36a302e6b5d886e3473255da4c3c2627a0c6..c58b213d1adba23edf38ef6774e62a98d84f055c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,15 @@ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
               2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
+* Version (unreleased)
+
+** libgnutls: gnutls_srp_verifier() returns data allocated with gnutls_malloc()
+for consistency.
+
+** API and ABI modifications:
+No changes since last version.
+
+
 * Version 2.99.3 (released 2011-06-18)
 
 ** libgnutls: Added new PKCS #11 flags to force an object being private or
index be359492b7df8ce3770b06381c6982892327814e..e4cab2e471f059492eea555a3df7eaeeff947460 100644 (file)
@@ -42,9 +42,9 @@
 /* Here functions for SRP (like g^x mod n) are defined 
  */
 
-int
+static int
 _gnutls_srp_gx (opaque * text, size_t textsize, opaque ** result,
-                bigint_t g, bigint_t prime, gnutls_alloc_function galloc_func)
+                bigint_t g, bigint_t prime)
 {
   bigint_t x, e;
   size_t result_size;
@@ -71,7 +71,7 @@ _gnutls_srp_gx (opaque * text, size_t textsize, opaque ** result,
   ret = _gnutls_mpi_print (e, NULL, &result_size);
   if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
     {
-      *result = galloc_func (result_size);
+      *result = gnutls_malloc (result_size);
       if ((*result) == NULL)
         return GNUTLS_E_MEMORY_ERROR;
 
@@ -680,7 +680,7 @@ gnutls_srp_server_get_username (gnutls_session_t session)
  * libgcrypt functions gcry_prime_generate() and
  * gcry_prime_group_generator().
  *
- * The verifier will be allocated with @malloc and will be stored in
+ * The verifier will be allocated with @gnutls_malloc() and will be stored in
  * @res using binary format.
  *
  * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, or an
@@ -719,7 +719,7 @@ gnutls_srp_verifier (const char *username, const char *password,
       return GNUTLS_E_MPI_SCAN_FAILED;
     }
 
-  ret = _gnutls_srp_gx (digest, 20, &res->data, _g, _n, malloc);
+  ret = _gnutls_srp_gx (digest, 20, &res->data, _g, _n);
   if (ret < 0)
     {
       gnutls_assert ();
index 76a257deaca1d7df6b12d28a8a22cc26d676e919..1f9fce798aeb75a66c1597c4ccd79432081c77a7 100644 (file)
@@ -25,8 +25,6 @@
 
 #ifdef ENABLE_SRP
 
-int _gnutls_srp_gx (opaque * text, size_t textsize, opaque ** result,
-                    bigint_t g, bigint_t prime, gnutls_alloc_function);
 bigint_t _gnutls_calc_srp_B (bigint_t * ret_b, bigint_t g, bigint_t n,
                              bigint_t v);
 bigint_t _gnutls_calc_srp_u (bigint_t A, bigint_t B, bigint_t N);