aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-05-15 07:56:40 +0000
committerWerner Koch <[email protected]>2024-05-15 07:56:40 +0000
commitb36e557c5b05ba21942f385c03988f138d57dfb9 (patch)
tree5907245f66f8e4b8922038c4f0a4a4028f0a6dce /g10/keygen.c
parenttpm2d: Use BYTE type to acces TPM2B object. (diff)
downloadgnupg-b36e557c5b05ba21942f385c03988f138d57dfb9.tar.gz
gnupg-b36e557c5b05ba21942f385c03988f138d57dfb9.zip
gpg: Terminate key listing on output write error.
* g10/keylist.c (list_all): Handle error from list_keyblock. (list_one): Ditto. (locate_one): Ditto. (list_keyblock): Detect write error, print, and return it. (list_keyblock_direct): Return error from list_keyblock. * g10/import.c (import_one_real): Break on listing error. -- Test by using gpg -k >/dev/full GnuPG-bug-id: 6185
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index fe9a5d8f2..4bdb9f53a 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -6292,9 +6292,12 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
list_keyblock_direct (ctrl, pub_root, 0, 1,
opt.fingerprint || opt.with_fingerprint,
1);
+ /* Note that we ignore errors from the list function
+ * because that would only be an additional info. It
+ * has already been remarked that the key has been
+ * created. */
}
-
if (!opt.batch
&& (get_parameter_algo (ctrl, para,
pKEYTYPE, NULL) == PUBKEY_ALGO_DSA