gnupg/g10 (ChangeLog keygen.c)

cvs user wk cvs at cvs.gnupg.org
Tue Jan 25 15:26:25 CET 2005


    Date: Tuesday, January 25, 2005 @ 15:34:51
  Author: wk
    Path: /cvs/gnupg/gnupg/g10

Modified: ChangeLog keygen.c

(do_generate_keypair): Don't continue after an error;
fixed at two places. Why at all didn't I used a goto to cleanup,
tsss?


-----------+
 ChangeLog |    6 +++++-
 keygen.c  |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.686 gnupg/g10/ChangeLog:1.687
--- gnupg/g10/ChangeLog:1.686	Tue Jan 25 15:18:56 2005
+++ gnupg/g10/ChangeLog	Tue Jan 25 15:34:51 2005
@@ -1,9 +1,13 @@
 2005-01-25  Werner Koch  <wk at g10code.com>
 
+	* keygen.c (do_generate_keypair): Don't continue after an error;
+	fixed at two places. Why at all didn't I used a goto to cleanup,
+	tsss?
+
 	* app-openpgp.c (get_cached_data): New arg GET_IMMEDIATE to bypass
 	the cache.  Changed all callers.
 	(get_one_do): Bypass the cache if the value would have been read
-	directly for v1.1 cards.It makes things a bit slower but obnly for
+	directly for v1.1 cards.  It makes things a bit slower but only for
 	1.0 cards and there are not that many cards out in the wild.  This
 	is required to fix a caching bug when generating new keys; as a
 	side effect of the retrieval of the the C4 DO from the 6E DO the
Index: gnupg/g10/keygen.c
diff -u gnupg/g10/keygen.c:1.141 gnupg/g10/keygen.c:1.142
--- gnupg/g10/keygen.c:1.141	Tue Dec 21 16:49:56 2004
+++ gnupg/g10/keygen.c	Tue Jan 25 15:34:51 2005
@@ -2820,7 +2820,7 @@
                                get_parameter_uint (para, pKEYUSAGE));
     }
 
-    if( get_parameter( para, pSUBKEYTYPE ) )
+    if( !rc && get_parameter( para, pSUBKEYTYPE ) )
       {
         if (!card)
           {
@@ -2859,7 +2859,7 @@
         did_sub = 1;
       }
 
-    if (card && get_parameter (para, pAUTHKEYTYPE))
+    if (!rc && card && get_parameter (para, pAUTHKEYTYPE))
       {
         rc = gen_card_key (PUBKEY_ALGO_RSA, 3, 0, pub_root, sec_root,
                            get_parameter_u32 (para, pKEYEXPIRE), para);




More information about the Gnupg-commits mailing list