aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-09 19:01:49 +0000
committerWerner Koch <[email protected]>2014-10-09 19:01:49 +0000
commit2ca90f78cee91c43b8d538d1cb92728f8e1452d5 (patch)
tree2690fc51434a88b781e8efa836c72d51215fc42d /g10/keylist.c
parentgpg: Sync keylist output and warning messages. (diff)
downloadgnupg-2ca90f78cee91c43b8d538d1cb92728f8e1452d5.tar.gz
gnupg-2ca90f78cee91c43b8d538d1cb92728f8e1452d5.zip
gpg: Skip overlong keys and a print a warning.
* kbx/keybox-search.c (keybox_search): Add arg r_skipped and skip too long blobs. * sm/keydb.c (keydb_search): Call keybox_search with a dummy param. * g10/keydb.c (struct keydb_handle): Add field skipped_long_blobs. (keydb_search_reset): Reset that field. (keydb_search): Update that field. (keydb_get_skipped_counter): New. * g10/keylist.c (list_all): Print count of skipped keys. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 4a028205a..b5ea84d1c 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -499,6 +499,9 @@ list_all (int secret, int mark_secret)
es_fflush (es_stdout);
if (rc && gpg_err_code (rc) != GPG_ERR_NOT_FOUND)
log_error ("keydb_search_next failed: %s\n", g10_errstr (rc));
+ if (keydb_get_skipped_counter (hd))
+ log_info (_("Warning: %lu key(s) skipped due to their large size\n"),
+ keydb_get_skipped_counter (hd));
if (opt.check_sigs && !opt.with_colons)
print_signature_stats (&stats);