From adadfac997a812699049cd9a5f484cbcabff5bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Wed, 15 May 2024 10:31:46 +0200 Subject: core: Add information about revocation keys to keys * src/gpgme.h.in (struct _gpgme_revocation_key, gpgme_revocation_key_t): New. (struct _gpgme_key): Add fields 'revkeys', '_last_revkey'. * src/key.c (_gpgme_key_add_rev_key): New. (gpgme_key_unref): Free revkeys. * src/keylist.c (keylist_colon_handler): Parse rvk lines. * src/ops.h (_gpgme_key_add_rev_key): New. * tests/run-keylist.c (main): Print revocation key info. -- GnuPG-bug-id: 7118 --- tests/run-keylist.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/run-keylist.c') diff --git a/tests/run-keylist.c b/tests/run-keylist.c index a9d4b6aa..9ecf380b 100644 --- a/tests/run-keylist.c +++ b/tests/run-keylist.c @@ -308,9 +308,11 @@ main (int argc, char **argv) gpgme_user_id_t uid; gpgme_tofu_info_t ti; gpgme_key_sig_t ks; + gpgme_revocation_key_t revkey; int nuids; int nsub; int nsigs; + int nrevkeys; printf ("keyid : %s\n", key->subkeys?nonnull (key->subkeys->keyid):"?"); printf ("can_cap : %s%s%s%s\n", @@ -425,6 +427,13 @@ main (int argc, char **argv) } } + revkey = key->revocation_keys; + for (nrevkeys=0; revkey; revkey = revkey->next, nrevkeys++) + { + printf ("revkey%2d: %s\n", nrevkeys, revkey->fpr); + printf (" class: %x\n", revkey->key_class); + } + putchar ('\n'); if (import) -- cgit v1.2.3