From 31eb45f01620d3e8811fe18460c281837bb3359f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 28 May 2021 18:31:26 +0200 Subject: [PATCH] tests: Improve the output of the run-keylist helper. * tests/run-keylist.c (main): Print all infos from the primary key. -- The test tool printed only the computed infos for the key and not the detailed one fro the primary key. The new output better reflects the data structure. Related to GnuPG-bug-id: 5454 --- tests/run-keylist.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/run-keylist.c b/tests/run-keylist.c index f0ab74e8..27cdbb2a 100644 --- a/tests/run-keylist.c +++ b/tests/run-keylist.c @@ -272,11 +272,6 @@ main (int argc, char **argv) int nsigs; printf ("keyid : %s\n", key->subkeys?nonnull (key->subkeys->keyid):"?"); - printf ("fpr : %s\n", key->subkeys?nonnull (key->subkeys->fpr):"?"); - if (key->subkeys && key->subkeys->keygrip) - printf ("grip : %s\n", key->subkeys->keygrip); - if (key->subkeys && key->subkeys->curve) - printf ("curve : %s\n", key->subkeys->curve); printf ("caps : %s%s%s%s\n", key->can_encrypt? "e":"", key->can_sign? "s":"", @@ -294,9 +289,7 @@ main (int argc, char **argv) printf ("upd : %lu (%u)\n", key->last_update, key->origin); subkey = key->subkeys; - if (subkey) - subkey = subkey->next; - for (nsub=1; subkey; subkey = subkey->next, nsub++) + for (nsub=0; subkey; subkey = subkey->next, nsub++) { printf ("fpr %2d: %s\n", nsub, nonnull (subkey->fpr)); if (subkey->keygrip)