diff options
author | Werner Koch <[email protected]> | 2024-05-15 07:56:40 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-05-15 07:56:40 +0000 |
commit | b36e557c5b05ba21942f385c03988f138d57dfb9 (patch) | |
tree | 5907245f66f8e4b8922038c4f0a4a4028f0a6dce /g10/main.h | |
parent | tpm2d: Use BYTE type to acces TPM2B object. (diff) | |
download | gnupg-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/main.h')
-rw-r--r-- | g10/main.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/main.h b/g10/main.h index 5123dd03b..2443aa7fe 100644 --- a/g10/main.h +++ b/g10/main.h @@ -470,8 +470,8 @@ void secret_key_list (ctrl_t ctrl, strlist_t list ); gpg_error_t parse_and_set_list_filter (const char *string); void print_subpackets_colon(PKT_signature *sig); void reorder_keyblock (KBNODE keyblock); -void list_keyblock_direct (ctrl_t ctrl, kbnode_t keyblock, int secret, - int has_secret, int fpr, int no_validity); +gpg_error_t list_keyblock_direct (ctrl_t ctrl, kbnode_t keyblock, int secret, + int has_secret, int fpr, int no_validity); int cmp_signodes (const void *av, const void *bv); void print_fingerprint (ctrl_t ctrl, estream_t fp, PKT_public_key *pk, int mode); |