diff options
| author | Ingo Klöcker <[email protected]> | 2024-05-15 10:31:46 +0200 |
|---|---|---|
| committer | Ingo Klöcker <[email protected]> | 2024-05-21 16:38:59 +0200 |
| commit | adadfac997a812699049cd9a5f484cbcabff5bfd (patch) | |
| tree | 41b5c964ed1396b20ede6968379708cc21802faf /src/gpgme.h.in | |
| parent | tests: Fix segv in t-json.c (diff) | |
| download | gpgme-adadfac997a812699049cd9a5f484cbcabff5bfd.tar.gz gpgme-adadfac997a812699049cd9a5f484cbcabff5bfd.zip | |
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
Diffstat (limited to 'src/gpgme.h.in')
| -rw-r--r-- | src/gpgme.h.in | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in index c8eba0a5..eaeb22aa 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -763,6 +763,28 @@ struct _gpgme_user_id typedef struct _gpgme_user_id *gpgme_user_id_t; +/* A designated revocation key for a key. + * This structure shall be considered read-only and an application + * must not allocate such a structure on its own. */ +struct _gpgme_revocation_key +{ + struct _gpgme_revocation_key *next; + + /* The public key algorithm of the revocation key. */ + gpgme_pubkey_algo_t pubkey_algo; + + /* The fingerprint of the revocation_key in hex digit form. */ + char *fpr; + + /* The class of the revocation key. */ + unsigned int key_class; + + /* True if the revocation key should not be exported. */ + unsigned int sensitive : 1; +}; +typedef struct _gpgme_revocation_key *gpgme_revocation_key_t; + + /* A key from the keyring. * This structure shall be considered read-only and an application * must not allocate such a structure on its own. */ @@ -860,6 +882,12 @@ struct _gpgme_key /* Time of the last refresh of the entire key. 0 if unknown. */ unsigned long last_update; + + /* The revocation keys of the key. */ + gpgme_revocation_key_t revocation_keys; + + /* Internal to GPGME, do not use. */ + gpgme_revocation_key_t _last_revkey; }; typedef struct _gpgme_key *gpgme_key_t; |
