aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.h.in
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-09-04 15:03:01 +0000
committerWerner Koch <[email protected]>2023-09-04 15:03:52 +0000
commite36b2d1bce4bb6281e18f53d06d7831e6d6f5a09 (patch)
tree0bb1000300dbd0370f2d4b60605a35f88e6adcfd /src/gpgme.h.in
parentbuild: Change the default for --with-libtool-modification. (diff)
downloadgpgme-e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09.tar.gz
gpgme-e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09.zip
New mode to list a v5 fingerprint for v4 packets.
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_V5FPR): New. (struct _gpgme_subkey): Add field v5fpr. * src/engine-gpg.c (gpg_keylist_build_options): Pass new option to gpg. * src/key.c (gpgme_key_unref): Free new field. * src/keylist.c (op_data_t): Parse and add "fp2" line. * tests/run-keylist.c (show_usage): Add option --v5fpr. * src/keylist.c (op_data_t): Add field failure_code. (keylist_status_handler): Handle special value. (gpgme_op_keylist_end): Return an error if a FAILURE line has been seen. -- Note that the failure code part has been added to better diagnose problems if a wrong gpg version is used. If verything works right we should not get this because we check that the gnupg version sis either >= 2.4.4 or less than 2.3 and >= 2.2.42. Note further that the v5fpr field may also be used to get the SHA-256 fingerprint of X.509 certificates (even without passing the new mode flag). GnuPG-bug-id: 6705
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r--src/gpgme.h.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in
index 1d3c1445..7110648e 100644
--- a/src/gpgme.h.in
+++ b/src/gpgme.h.in
@@ -384,6 +384,7 @@ gpgme_protocol_t;
#define GPGME_KEYLIST_MODE_EPHEMERAL 128
#define GPGME_KEYLIST_MODE_VALIDATE 256
#define GPGME_KEYLIST_MODE_FORCE_EXTERN 512
+#define GPGME_KEYLIST_MODE_WITH_V5FPR 1024
#define GPGME_KEYLIST_MODE_LOCATE (1|2)
#define GPGME_KEYLIST_MODE_LOCATE_EXTERNAL (1|2|512)
@@ -616,6 +617,9 @@ struct _gpgme_subkey
/* The keygrip of the subkey in hex digit form or NULL if not available. */
char *keygrip;
+
+ /* For OpenPGP the v5 fpr of a v4 key. For X.509 the SHA256 fingerprint. */
+ char *v5fpr;
};
typedef struct _gpgme_subkey *gpgme_subkey_t;