[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_17-7-g9e760c4

"Nikos Mavrogiannopoulos" <[email protected]>
Newsgroups gmane.comp.encryption.gpg.gnutls.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=9e760c41f7933c68f543395273cfeaa642ac496a

The branch, gnutls_2_12_x has been updated
       via  9e760c41f7933c68f543395273cfeaa642ac496a (commit)
       via  65f3c370a25a604bb3fa085c3dff99e0312c6f04 (commit)
      from  a113a913975a06e9760a02d3b39b80c615e40fe7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9e760c41f7933c68f543395273cfeaa642ac496a
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Fri Mar 16 08:27:11 2012 +0100

    corrected memory leaks in tests.

commit 65f3c370a25a604bb3fa085c3dff99e0312c6f04
Author: Nikos Mavrogiannopoulos <[email protected]>
Date:   Fri Mar 16 08:26:42 2012 +0100

    corrected memory leaks in prime generation.

-----------------------------------------------------------------------

Summary of changes:
 lib/nettle/mpi.c              |    5 -----
 tests/gendh.c                 |    8 ++++++--
 tests/mini-x509-rehandshake.c |    1 +
 tests/openpgp-auth.c          |   32 +++++++++++++++++++++++---------
 4 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c
index b880e15..59e34eb 100644
--- a/lib/nettle/mpi.c
+++ b/lib/nettle/mpi.c
@@ -422,9 +422,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits)
   unsigned int q_bytes, w_bytes, r_bytes, w_bits;
   int ret;
 
-  mpz_init (*prime);
-  mpz_init (*generator);
-
   /* security level enforcement. 
    * Values for q are selected according to ECRYPT II recommendations.
    */
@@ -455,8 +452,6 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits)
       return GNUTLS_E_MEMORY_ERROR;
     }
 
-  mpz_init2 (*prime, nbits);
-  mpz_init (*generator);
   mpz_init (q);
   mpz_init (w);
 
diff --git a/tests/gendh.c b/tests/gendh.c
index e3732bb..f139677 100644
--- a/tests/gendh.c
+++ b/tests/gendh.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2010, 2012 Free Software Foundation, Inc.
  *
  * Author: Simon Josefsson
  *
@@ -43,6 +43,10 @@ doit (void)
 
   if (gnutls_dh_params_generate2 (dh_params, 1024) < 0)
     fail ("Error in prime generation\n");
+    
+  gnutls_dh_params_deinit(dh_params);
+  
+  gnutls_global_deinit();
 
-  success ("generated DH params OK\n");
+  if (debug) success ("generated DH params OK\n");
 }
diff --git a/tests/mini-x509-rehandshake.c b/tests/mini-x509-rehandshake.c
index 52cc4c0..04d7c22 100644
--- a/tests/mini-x509-rehandshake.c
+++ b/tests/mini-x509-rehandshake.c
@@ -146,6 +146,7 @@ doit (void)
   gnutls_deinit (server);
 
   gnutls_certificate_free_credentials (serverx509cred);
+  gnutls_certificate_free_credentials (clientx509cred);
 
   gnutls_global_deinit ();
 
diff --git a/tests/openpgp-auth.c b/tests/openpgp-auth.c
index 9da10b6..9787916 100644
--- a/tests/openpgp-auth.c
+++ b/tests/openpgp-auth.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Free Software Foundation
+ * Copyright (C) 2010-2012 Free Software Foundation, Inc.
  * Author: Ludovic Courtès
  *
  * This file is part of GNUTLS.
@@ -67,19 +67,19 @@ doit ()
 
   srcdir = getenv ("srcdir") ? getenv ("srcdir") : ".";
 
-  for (i = 0; i < 3; i++)
+  for (i = 0; i < 4; i++)
     {
 
-      if (i == 0)
+      if (i <= 1)
         key_id = NULL;          /* try using the master key */
-      else if (i == 1)
-        key_id = "auto";        /* test auto */
       else if (i == 2)
+        key_id = "auto";        /* test auto */
+      else if (i == 3)
         key_id = "f30fd423c143e7ba";
 
       if (debug)
         {
-          gnutls_global_set_log_level (10);
+          gnutls_global_set_log_level (5);
           gnutls_global_set_log_function (log_message);
         }
 
@@ -115,7 +115,12 @@ doit ()
           if (err != 0)
             fail ("client session %d\n", err);
 
-          gnutls_priority_set_direct (session,
+          if (i==0) /* we use the primary key which is RSA. Test the RSA ciphersuite */
+            gnutls_priority_set_direct (session,
+                                      "NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+RSA:+CTYPE-OPENPGP",
+                                      NULL);
+          else
+            gnutls_priority_set_direct (session,
                                       "NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+CTYPE-OPENPGP",
                                       NULL);
           gnutls_transport_set_ptr (session,
@@ -158,6 +163,9 @@ doit ()
 
           if (debug)
             printf ("client done\n");
+          
+          gnutls_deinit(session);
+          gnutls_certificate_free_credentials (cred);
         }
       else
         {
@@ -169,7 +177,7 @@ doit ()
           ssize_t received;
           pid_t done;
           int status;
-          const gnutls_datum_t p3 = { (char *) pkcs3, strlen (pkcs3) };
+          const gnutls_datum_t p3 = { (void *) pkcs3, strlen (pkcs3) };
 
           if (debug)
             printf ("server process %i (child %i)\n", getpid (), child);
@@ -179,7 +187,7 @@ doit ()
             fail ("server session %d\n", err);
 
           gnutls_priority_set_direct (session,
-                                      "NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+CTYPE-OPENPGP",
+                                      "NONE:+VERS-TLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+DHE-DSS:+DHE-RSA:+RSA:+CTYPE-OPENPGP",
                                       NULL);
           gnutls_transport_set_ptr (session,
                                     (gnutls_transport_ptr_t) (intptr_t)
@@ -235,6 +243,10 @@ doit ()
           if (debug)
             printf ("server done\n");
 
+          gnutls_deinit(session);
+          gnutls_certificate_free_credentials (cred);
+          gnutls_dh_params_deinit (dh_params);
+
           done = wait (&status);
           if (done < 0)
             fail ("wait %s\n", strerror (errno));
@@ -254,6 +266,8 @@ doit ()
         }
 
     }
+
+  gnutls_global_deinit ();
 }
 #else
 void


hooks/post-receive
-- 
GNU gnutls
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.