gnutls-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gnutls branch, master, updated. gnutls_2_99_3-31-ge67bdb5


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_99_3-31-ge67bdb5
Date: Sat, 23 Jul 2011 14:31:02 +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=e67bdb571e806165d9611c507de6473ecc410525

The branch, master has been updated
       via  e67bdb571e806165d9611c507de6473ecc410525 (commit)
       via  45058379c1e8daf32fa62f27f72646c1a00e04d8 (commit)
      from  cae9c34a1a7a85e81644fa8438a5ebd4b088e280 (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 e67bdb571e806165d9611c507de6473ecc410525
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 45058379c1e8daf32fa62f27f72646c1a00e04d8
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 3a29212..ef2801a 100644
--- a/lib/gnutls_privkey.c
+++ b/lib/gnutls_privkey.c
@@ -269,6 +269,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 226c9e4..cf831d3 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -1827,15 +1827,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]