diff options
author | Werner Koch <[email protected]> | 2005-01-25 14:34:51 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2005-01-25 14:34:51 +0000 |
commit | aa62bf505ddb5bb85187fbdfe5293e4d4465600a (patch) | |
tree | 5da7ffe259d83a5927c7c16b486a2d224e1eb519 | |
parent | (get_cached_data): New arg GET_IMMEDIATE to bypass (diff) | |
download | gnupg-aa62bf505ddb5bb85187fbdfe5293e4d4465600a.tar.gz gnupg-aa62bf505ddb5bb85187fbdfe5293e4d4465600a.zip |
(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?
-rw-r--r-- | g10/ChangeLog | 6 | ||||
-rw-r--r-- | g10/keygen.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 9373a8cd5..b2ac9dd58 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,9 +1,13 @@ 2005-01-25 Werner Koch <[email protected]> + * 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 diff --git a/g10/keygen.c b/g10/keygen.c index 000454eb9..a20c48c1b 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -2820,7 +2820,7 @@ do_generate_keypair( struct para_data_s *para, get_parameter_uint (para, pKEYUSAGE)); } - if( get_parameter( para, pSUBKEYTYPE ) ) + if( !rc && get_parameter( para, pSUBKEYTYPE ) ) { if (!card) { @@ -2859,7 +2859,7 @@ do_generate_keypair( struct para_data_s *para, 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); |