[svn] gcry - r1292 - in trunk: . cipher
svn author wk
cvs at cvs.gnupg.org
Tue Jun 24 10:11:05 CEST 2008
Author: wk
Date: 2008-06-24 10:11:04 +0200 (Tue, 24 Jun 2008)
New Revision: 1292
Modified:
trunk/THANKS
trunk/TODO
trunk/cipher/ChangeLog
trunk/cipher/ac.c
Log:
Fixed memory leak inthe ac functions.
Modified: trunk/cipher/ChangeLog
===================================================================
--- trunk/cipher/ChangeLog 2008-05-27 11:46:15 UTC (rev 1291)
+++ trunk/cipher/ChangeLog 2008-06-24 08:11:04 UTC (rev 1292)
@@ -1,3 +1,8 @@
+2008-06-24 Szakats Istvan <szaki.ms at gmail.com> (wk)
+
+ * ac.c (_gcry_ac_key_destroy, _gcry_ac_key_pair_generate): Relase
+ some more memory.
+
2008-04-22 Werner Koch <wk at g10code.com>
* rijndael.c (_gcry_aes_cfb_enc, _gcry_aes_cbc_enc)
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2008-05-27 11:46:15 UTC (rev 1291)
+++ trunk/THANKS 2008-06-24 08:11:04 UTC (rev 1292)
@@ -126,6 +126,7 @@
Steffen Zahn zahn at berlin.snafu.de
Steven Bakker steven at icoe.att.com
Susanne Schultz schultz at hsp.de
+Szakats Istvan szaki.ms at gmail.com
Thiago Jung Bauermann jungmann at cwb.matrix.com.br
Thomas Roessler roessler at guug.de
Tom Holroyd tomh at po.crl.go.jp
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2008-05-27 11:46:15 UTC (rev 1291)
+++ trunk/TODO 2008-06-24 08:11:04 UTC (rev 1292)
@@ -66,6 +66,16 @@
collectros need to run that bunch of Unix utilities we don't waste
their precious results.
+* Add transient flag to RSA key generation
+ For short living keys it makes sense to allow generation using a PRNG.
+ We could implement it this way:
+
+ (genkey
+ (rsa
+ (nbits 4:1024)
+ (transient-key)))
+
+
* Out of memory handler for secure memory should do proper logging
There is no shortage of standard memory, so logging is most likely
Modified: trunk/cipher/ac.c
===================================================================
--- trunk/cipher/ac.c 2008-05-27 11:46:15 UTC (rev 1291)
+++ trunk/cipher/ac.c 2008-06-24 08:11:04 UTC (rev 1292)
@@ -1,6 +1,6 @@
/* ac.c - Alternative interface for asymmetric cryptography.
Copyright (C) 2003, 2004, 2005, 2006
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of Libgcrypt.
@@ -1496,6 +1496,7 @@
arg_list = NULL;
genkey_sexp_request = NULL;
genkey_sexp_reply = NULL;
+ key_sexp = NULL;
/* Allocate key pair. */
key_pair_new = gcry_malloc (sizeof (struct gcry_ac_key_pair));
@@ -1631,6 +1632,7 @@
gcry_free (arg_list);
gcry_sexp_release (genkey_sexp_request);
gcry_sexp_release (genkey_sexp_reply);
+ gcry_sexp_release (key_sexp);
if (err)
{
_gcry_ac_data_destroy (key_data_secret);
@@ -1679,8 +1681,13 @@
if (key->data)
{
for (i = 0; i < key->data->data_n; i++)
- if (key->data->data[i].mpi != NULL)
- gcry_mpi_release (key->data->data[i].mpi);
+ {
+ if (key->data->data[i].mpi)
+ gcry_mpi_release (key->data->data[i].mpi);
+ if (key->data->data[i].name)
+ gcry_free (key->data->data[i].name);
+ }
+ gcry_free (key->data->data);
gcry_free (key->data);
}
gcry_free (key);
More information about the Gnupg-commits
mailing list