gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_7_a-3-g01c4


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_7_a-3-g01c4439
Date: Sat, 23 Jul 2011 14:33:47 +0000

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=01c4439909aab068e4549b9330528aa71d5ba69a

The branch, gnutls_2_12_x has been updated
       via  01c4439909aab068e4549b9330528aa71d5ba69a (commit)
       via  13f8feaaae45949b4fd6130b728323076049b745 (commit)
      from  0aaf521bf4cbede8b2604fbc45c9bdc01084b8ea (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 01c4439909aab068e4549b9330528aa71d5ba69a
Author: Petr Písař <address@hidden>
Date:   Wed Jun 29 22:54:33 2011 +0200

    Honor uninitialized private key in destructor
    
    Fixes bug #107730.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

commit 13f8feaaae45949b4fd6130b728323076049b745
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Jul 23 16:27:47 2011 +0200

    Corrected initialization of key when generating request. Reported by Petr 
Pisar.

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

Summary of changes:
 lib/gnutls_privkey.c |    2 ++
 src/certtool.c       |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c
index eb4bd6b..2f5d06b 100644
--- a/lib/gnutls_privkey.c
+++ b/lib/gnutls_privkey.c
@@ -266,6 +266,8 @@ gnutls_privkey_init (gnutls_privkey_t * key)
 void
 gnutls_privkey_deinit (gnutls_privkey_t key)
 {
+  if (key == NULL) return;
+
   if (key->flags & GNUTLS_PRIVKEY_IMPORT_AUTO_RELEASE)
     switch (key->type)
       {
diff --git a/src/certtool.c b/src/certtool.c
index 023abfe..061980d 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -1773,15 +1773,16 @@ generate_request (common_info_st * cinfo)
   if (ret < 0)
     error (EXIT_FAILURE, 0, "crq_init: %s", gnutls_strerror (ret));
 
-  ret = gnutls_privkey_init (&pkey);
-  if (ret < 0)
-    error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (ret));
 
   /* Load the private key.
    */
   pkey = load_private_key (0, cinfo);
   if (!pkey)
     {
+      ret = gnutls_privkey_init (&pkey);
+      if (ret < 0)
+        error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (ret));
+
       xkey = generate_private_key_int ();
 
       print_private_key (xkey);


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]