From 276187f6b62a73e92b1c20f589510f80ab9e88d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 4 May 2021 18:35:29 +0200 Subject: core: Extend gpgme_key_sig_t with trust signature members. * src/gpgme.h.in (struct _gpgme_key_sig): Add fields 'trust_depth', 'trust_value', and 'trust_scope'. * src/key.c (gpgme_key_unref): Free trust_scope. * src/keylist.c (keylist_colon_handler): Set the fields. * tests/run-keylist.c (main): Print the fields. -- The trust signature values are part of gpg's output since the year 2003. This now adds support to gpgme. GnuPG-bug-id: 5245, 5419 --- src/gpgme.h.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gpgme.h.in') diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 0a90c8d2..6471f0ad 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -627,7 +627,13 @@ struct _gpgme_key_sig unsigned int exportable : 1; /* Internal to GPGME, do not use. */ - unsigned int _unused : 28; + unsigned int _unused : 12; + + /* The depth of a trust signature, 0 if no trust signature. */ + unsigned int trust_depth : 8; + + /* The trust value of a trust signature, 0 if no trust signature. */ + unsigned int trust_value : 8; /* The public key algorithm used to create the signature. */ gpgme_pubkey_algo_t pubkey_algo; @@ -644,6 +650,9 @@ struct _gpgme_key_sig /* The expiration timestamp, 0 if the subkey does not expire. */ long int expires; + /* The scope of a trust signature. Might be NULL. */ + char *trust_scope; + /* Same as in gpgme_signature_t. */ gpgme_error_t status; -- cgit v1.2.3